| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 
 | obj =
  root:
    '@att': 'attribute value with & and &'
    '#text': 'XML entities for ampersand are & and &.'
suite 'Tests specific to issues:', ->
  test 'Issue #97 (No double encoding)', ->
    eq(
      xml(obj, { noDoubleEncoding: true }).end()
      '<?xml version="1.0"?>' +
      '<root att="attribute value with & and &#38;">' +
        'XML entities for ampersand are & and &#38;.' +
      '</root>'
    )
  test 'Issue #97 (Double encoding - default behavior)', ->
    eq(
      xml(obj).end()
      '<?xml version="1.0"?>' +
      '<root att="attribute value with &amp; and &#38;">' +
        'XML entities for ampersand are &amp; and &#38;.' +
      '</root>'
    )
 |