File: text.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 (18 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
suite 'Text Processing:', ->
  test 'Escape "', ->
    eq(
      xml('test8', {}, {}, { headless: true }).ele('node', '"').end()
      '<test8><node>"</node></test8>'
    )

  test 'Text node with empty string', ->
    eq(
      xml('test9', {}, {}, { headless: true }).text('').end()
      '<test9/>'
    )
    
  test 'Text node with empty string (pretty print)', ->
    eq(
      xml('test10', {}, {}, { headless: true }).text('').end()
      '<test10/>'
    )