From 15530c447c7252b586c99cf77c328295ad7a33c5 Mon Sep 17 00:00:00 2001 From: Ben Bleything Date: Tue, 12 Sep 2006 17:14:00 +0000 Subject: add test to expose bug in parser when handling comments in xml files --- test/assets/commented.plist | 5 +++++ test/test_parser.rb | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 test/assets/commented.plist diff --git a/test/assets/commented.plist b/test/assets/commented.plist new file mode 100644 index 0000000..f30ed9d --- /dev/null +++ b/test/assets/commented.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/test/test_parser.rb b/test/test_parser.rb index 5aeda6c..ec18bfd 100644 --- a/test/test_parser.rb +++ b/test/test_parser.rb @@ -97,6 +97,12 @@ class TestPlist < Test::Unit::TestCase data = Plist::parse_xml(Plist::_xml('Fish & Chips')) assert_equal('Fish & Chips', data) end + + def test_comment_handling + assert_nothing_raised do + Plist::parse_xml( File.read('test/assets/commented.plist') ) + end + end end __END__ -- cgit v1.2.1