File: test_iso.rb

package info (click to toggle)
ruby-nokogiri 1.11.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,576 kB
  • sloc: xml: 28,086; ruby: 18,456; java: 13,067; ansic: 5,138; yacc: 265; sh: 208; makefile: 27
file content (15 lines) | stat: -rw-r--r-- 426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require "helper"

class TestISO < Nokogiri::TestCase
  def test_iso_content_not_lacking_accents
    data = IO.binread('test/files/iso-8859-1.xml')
    document = Nokogiri::XML(data)
    assert_equal "Accepté", document.at('DATA').text
  end

  def test_iso_content_not_truncated
    data = IO.binread('test/files/iso-8859-1.xml')
    document = Nokogiri::XML(data)
    assert_equal 2, document.search('DATA').count
  end
end