issue-30.js 662 B

123456789101112131415161718192021222324
  1. // https://github.com/isaacs/sax-js/issues/33
  2. require(__dirname).test
  3. ( { xml : "<xml>\n"+
  4. "<!-- \n"+
  5. " comment with a single dash- in it\n"+
  6. "-->\n"+
  7. "<data/>\n"+
  8. "</xml>"
  9. , expect :
  10. [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
  11. , [ "text", "\n" ]
  12. , [ "comment", " \n comment with a single dash- in it\n" ]
  13. , [ "text", "\n" ]
  14. , [ "opentag", { name: "data", attributes: {}, isSelfClosing: true } ]
  15. , [ "closetag", "data" ]
  16. , [ "text", "\n" ]
  17. , [ "closetag", "xml" ]
  18. ]
  19. , strict : true
  20. , opt : {}
  21. }
  22. )