| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = '13.4.4.28.js'; |
| 8 |
|
| 9 |
START("13.4.4.28 - processingInsructions()"); |
| 10 |
|
| 11 |
TEST(1, true, XML.prototype.hasOwnProperty("processingInstructions")); |
| 12 |
|
| 13 |
XML.ignoreProcessingInstructions = false; |
| 14 |
|
| 15 |
|
| 16 |
x = <alpha><?xyz abc="123" michael="wierd"?><?another name="value" ?><bravo>one</bravo></alpha>; |
| 17 |
|
| 18 |
correct = <><?xyz abc="123" michael="wierd"?><?another name="value" ?></>; |
| 19 |
|
| 20 |
TEST(2, correct, x.processingInstructions()); |
| 21 |
TEST(3, correct, x.processingInstructions("*")); |
| 22 |
|
| 23 |
correct = "<?xyz abc=\"123\" michael=\"wierd\"?>"; |
| 24 |
|
| 25 |
TEST_XML(4, correct, x.processingInstructions("xyz")); |
| 26 |
|
| 27 |
// test XML-decl |
| 28 |
// Un-comment these tests when we can read in doc starting with PI. |
| 29 |
//x = new XML("<?xml version=\"1.0\" ?><alpha><bravo>one</bravo></alpha>"); |
| 30 |
|
| 31 |
//correct = new XMLList(<?xml version="1.0" encoding="utf-8"?>); |
| 32 |
|
| 33 |
//test(5, correct, x.processingInstructions()); |
| 34 |
//test(6, correct, x.processingInstructions("*")); |
| 35 |
//test(7, correct, x.processingInstructions("xml")); |
| 36 |
|
| 37 |
END(); |