Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Apr 26, 2022
1 parent 818483f commit 182a40b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,26 @@ int main(int argc, char *argv[])
});
});

it('should fail parsing invalid xml plist', function () {
var xml = multiline(function () {
/*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>test</key>
<strong>Testing</strong>
<key>bar</key>
<string></string>
</dict>
</plist>
*/
});
assert.throws(function () {
var parsed = parse(xml);
});
});

it('should parse an example "Xcode-Info.plist" file', function () {
var xml = multiline(function () {
/*
Expand Down

0 comments on commit 182a40b

Please sign in to comment.