aboutsummaryrefslogtreecommitdiff
path: root/node_modules/sax/test/stray-ending.js
blob: bec467b2267362ac79de844a8e57a560448ffbab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// stray ending tags should just be ignored in non-strict mode.
// https://github.com/isaacs/sax-js/issues/32
require(__dirname).test
  ( { xml :
      "<a><b></c></b></a>"
    , expect :
      [ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ]
      , [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ]
      , [ "text", "</c>" ]
      , [ "closetag", "B" ]
      , [ "closetag", "A" ]
      ]
    , strict : false
    , opt : {}
    }
  )