diff options
-rw-r--r-- | test/assets/commented.plist | 5 | ||||
-rw-r--r-- | test/test_parser.rb | 6 |
2 files changed, 11 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<!-- I am a comment! --> +</plist> 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('<string>Fish & Chips</string>')) 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__ |