Skip to content

Commit

Permalink
Merge pull request #127 from ndtoan96/master
Browse files Browse the repository at this point in the history
Add testcases for tab character in string
  • Loading branch information
arp242 authored Jan 15, 2023
2 parents efb785b + 2aac3f4 commit 82f3228
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/valid/string/raw-multiline.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
"oneline": {
"type": "string",
"value": "This string has a ' quote character."
},
"multiline_with_tab": {
"type": "string",
"value": "First line\n\t Followed by a tab"
}
}
4 changes: 4 additions & 0 deletions tests/valid/string/raw-multiline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ has ' a quote character
and more than
one newline
in it.'''

# Tab character in literal string does not need to be escaped
multiline_with_tab = '''First line
Followed by a tab'''
4 changes: 4 additions & 0 deletions tests/valid/string/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
"tab": {
"type": "string",
"value": "This string has a \\t tab character."
},
"unescaped_tab": {
"type": "string",
"value": "This string has an \t unescaped tab character."
}
}
1 change: 1 addition & 0 deletions tests/valid/string/raw.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
backspace = 'This string has a \b backspace character.'
tab = 'This string has a \t tab character.'
unescaped_tab = 'This string has an unescaped tab character.'
newline = 'This string has a \n new line character.'
formfeed = 'This string has a \f form feed character.'
carriage = 'This string has a \r carriage return character.'
Expand Down

0 comments on commit 82f3228

Please sign in to comment.