File: strings2_test.hjson

package info (click to toggle)
python-hjson 3.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,188 kB
  • sloc: python: 3,098; makefile: 13; sh: 8
file content (36 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  # Hjson 3 allows the use of single quotes

  'key1': a key in single quotes
  'key 2': a key in single quotes
  'key "': a key in single quotes

  text: [
    'single quoted string'
    'You need quotes\tfor escapes'
    ' untrimmed '
    'untrimmed '
    'containing " double quotes'
    'containing \" double quotes'
    "containing \" double quotes"
    '"containing more " double quotes"'
    'containing \' single quotes'
    "containing ' single quotes"
    "containing \' single quotes"
    "'containing more ' single quotes'"
    "\'containing more \' single quotes\'"

    '\n'
    '  \n'
    '\n  \n  \n  \n'
    '\t\n'
  ]

  # escapes/no escape

  foo3a: 'asdf\'\'\''
  foo3b: '\'\'\'asdf'

  foo4a: 'asdf\'\'\'\nasdf'
  foo4b: 'asdf\n\'\'\'asdf'
}