Skip to content

Commit 82f3228

Browse files
authored
Merge pull request #127 from ndtoan96/master
Add testcases for tab character in string
2 parents efb785b + 2aac3f4 commit 82f3228

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

tests/valid/string/raw-multiline.json

+4
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
"oneline": {
1111
"type": "string",
1212
"value": "This string has a ' quote character."
13+
},
14+
"multiline_with_tab": {
15+
"type": "string",
16+
"value": "First line\n\t Followed by a tab"
1317
}
1418
}

tests/valid/string/raw-multiline.toml

+4
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ has ' a quote character
1212
and more than
1313
one newline
1414
in it.'''
15+
16+
# Tab character in literal string does not need to be escaped
17+
multiline_with_tab = '''First line
18+
Followed by a tab'''

tests/valid/string/raw.json

+4
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@
2626
"tab": {
2727
"type": "string",
2828
"value": "This string has a \\t tab character."
29+
},
30+
"unescaped_tab": {
31+
"type": "string",
32+
"value": "This string has an \t unescaped tab character."
2933
}
3034
}

tests/valid/string/raw.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
backspace = 'This string has a \b backspace character.'
22
tab = 'This string has a \t tab character.'
3+
unescaped_tab = 'This string has an unescaped tab character.'
34
newline = 'This string has a \n new line character.'
45
formfeed = 'This string has a \f form feed character.'
56
carriage = 'This string has a \r carriage return character.'

0 commit comments

Comments
 (0)