File: cdata.coffee

package info (click to toggle)
node-xml2js 0.4.23%2B~cs15.4.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,380 kB
  • sloc: xml: 117; javascript: 7; makefile: 2
file content (8 lines) | stat: -rw-r--r-- 258 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
suite 'CDATA', ->
  test 'Nested CDATA', ->
    eq(
      xml('test', {}, {}, { headless: true })
        .cdata('foo and <![CDATA[<foo>bar</foo>]]> bar')
      .end()
      '<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test>'
    )