aboutsummaryrefslogtreecommitdiff
path: root/node_modules/sax/test/issue-30.js
blob: 771b14e9241eb64ab0df82b81e751cb8913f9b13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// https://github.com/isaacs/sax-js/issues/33
require(__dirname).test
  ( { xml : "<xml>\n"+
            "<!-- \n"+
            "  comment with a single dash- in it\n"+
            "-->\n"+
            "<data/>\n"+
            "</xml>"

    , expect :
      [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
      , [ "text", "\n" ]
      , [ "comment", " \n  comment with a single dash- in it\n" ]
      , [ "text", "\n" ]
      , [ "opentag", { name: "data", attributes: {}, isSelfClosing: true } ]
      , [ "closetag", "data" ]
      , [ "text", "\n" ]
      , [ "closetag", "xml" ]
      ]
    , strict : true
    , opt : {}
    }
  )