-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in string-only load case. Improve test coverage.
- Loading branch information
Ken Kundert
authored and
Ken Kundert
committed
Oct 8, 2020
1 parent
5137d68
commit 3b9ed60
Showing
28 changed files
with
175 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 1, | ||
"colno": 0, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 2, | ||
"colno": 0, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 4, | ||
"message": "invalid character in indentation: '\\t'" | ||
"message": "invalid character in indentation: '\\t'." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 2, | ||
"colno": 0, | ||
"message": "expected dictionary item" | ||
"message": "expected dictionary item." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 2, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 0, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 0, | ||
"message": "expected dictionary item" | ||
"message": "expected dictionary item." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 2, | ||
"colno": null, | ||
"message": "unrecognized line" | ||
"message": "unrecognized line." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 2, | ||
"colno": 0, | ||
"message": "duplicate key: key" | ||
"message": "duplicate key: key." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 2, | ||
"colno": 4, | ||
"message": "invalid character in indentation: '\\t'" | ||
"message": "invalid character in indentation: '\\t'." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
key: | ||
- A | ||
- B | ||
- C | ||
- | ||
- D1 | ||
- D2 | ||
- E | ||
- A | ||
- B | ||
- C | ||
- | ||
- D1 | ||
- D2 | ||
- E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"key": ["A", "B", "C", ["D1", "D2"], "E"]} | ||
["A", "B", "C", ["D1", "D2"], "E"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 2, | ||
"message": "expected list item" | ||
"message": "expected list item." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 5, | ||
"lineno": 2, | ||
"colno": 0, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
ingredients: | ||
|
||
- green chilies | ||
- green chilies | ||
|
||
- red chilies | ||
- red chilies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 4, | ||
"message": "invalid indentation" | ||
"lineno": 2, | ||
"colno": 0, | ||
"message": "invalid indentation." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
ingredients: | ||
- green chilies | ||
- red chilies | ||
- green chilies | ||
- red chilies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
: | ||
- : | ||
- ~!@#$%^&*()_+-1234567890{}[]|\:;<>?,./ | ||
- - value 3 | ||
- ' : value 4:' | ||
- > value 5 | ||
- #value 6 | ||
- key 7' : : value 7 | ||
- " value 8 " | ||
- ' value 9 ' | ||
- value '" 10 | ||
- And Fred said 'yabba dabba doo!' to Barney. | ||
- : | ||
- ~!@#$%^&*()_+-1234567890{}[]|\:;<>?,./ | ||
- - value 3 | ||
- ' : value 4:' | ||
- > value 5 | ||
- #value 6 | ||
- key 7' : : value 7 | ||
- " value 8 " | ||
- ' value 9 ' | ||
- value '" 10 | ||
- And Fred said 'yabba dabba doo!' to Barney. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
: | ||
- : | ||
- ~!@#$%^&*()_+-1234567890{}[]|\:;<>?,./ | ||
- - value 3 | ||
- ' : value 4:' | ||
- > value 5 | ||
- #value 6 | ||
- key 7' : : value 7 | ||
- " value 8 " | ||
- ' value 9 ' | ||
- | ||
> value '" 10 | ||
- And Fred said 'yabba dabba doo!' to Barney. | ||
- : | ||
- ~!@#$%^&*()_+-1234567890{}[]|\:;<>?,./ | ||
- - value 3 | ||
- ' : value 4:' | ||
- > value 5 | ||
- #value 6 | ||
- key 7' : : value 7 | ||
- " value 8 " | ||
- ' value 9 ' | ||
- | ||
> value '" 10 | ||
- And Fred said 'yabba dabba doo!' to Barney. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 2, | ||
"colno": null, | ||
"message": "unrecognized line" | ||
"message": "unrecognized line." | ||
} |
47 changes: 24 additions & 23 deletions
47
tests/official_tests/test_cases/string_multiline_2/dump_out.nt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
Lorem ipsum: | ||
> | ||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | ||
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | ||
> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | ||
> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat | ||
> non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
> | ||
> | ||
> Sed ut perspiciatis unde omnis iste natus error sit voluptatem | ||
> accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab | ||
> illo inventore veritatis et quasi architecto beatae vitae dicta sunt | ||
> explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit | ||
> aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem | ||
> sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit | ||
> amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora | ||
> incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad | ||
> minima veniam, quis nostrum exercitationem ullam corporis suscipit | ||
> laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum | ||
> iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae | ||
> consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" | ||
> | ||
> | ||
> Lorem Ipsum | ||
> | ||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | ||
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | ||
> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | ||
> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat | ||
> non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
> | ||
> | ||
> Sed ut perspiciatis unde omnis iste natus error sit voluptatem | ||
> accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab | ||
> illo inventore veritatis et quasi architecto beatae vitae dicta sunt | ||
> explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit | ||
> aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem | ||
> sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit | ||
> amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora | ||
> incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad | ||
> minima veniam, quis nostrum exercitationem ullam corporis suscipit | ||
> laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum | ||
> iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae | ||
> consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" | ||
> |
52 changes: 28 additions & 24 deletions
52
tests/official_tests/test_cases/string_multiline_2/load_in.nt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
Lorem ipsum: | ||
> | ||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | ||
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | ||
> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | ||
> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat | ||
> non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
> | ||
> | ||
> Lorem Ipsum | ||
> | ||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | ||
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | ||
> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | ||
> cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat | ||
> non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
> | ||
|
||
# Here is a bit more that one rarely sees ... | ||
# Here is a bit more that one rarely sees ... | ||
|
||
> | ||
> Sed ut perspiciatis unde omnis iste natus error sit voluptatem | ||
> accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab | ||
> illo inventore veritatis et quasi architecto beatae vitae dicta sunt | ||
> explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit | ||
> aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem | ||
> sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit | ||
> amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora | ||
> incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad | ||
> minima veniam, quis nostrum exercitationem ullam corporis suscipit | ||
> laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum | ||
> iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae | ||
> consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" | ||
> | ||
|
||
# There is more, but let's stop here. | ||
|
||
> | ||
> Sed ut perspiciatis unde omnis iste natus error sit voluptatem | ||
> accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab | ||
> illo inventore veritatis et quasi architecto beatae vitae dicta sunt | ||
> explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit | ||
> aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem | ||
> sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit | ||
> amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora | ||
> incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad | ||
> minima veniam, quis nostrum exercitationem ullam corporis suscipit | ||
> laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum | ||
> iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae | ||
> consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" | ||
> |
2 changes: 1 addition & 1 deletion
2
tests/official_tests/test_cases/string_multiline_2/load_out.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"Lorem ipsum": "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse \ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \nnon proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\n\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem\naccusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab \nillo inventore veritatis et quasi architecto beatae vitae dicta sunt \nexplicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit \naut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem \nsequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit \namet, consectetur, adipisci velit, sed quia non numquam eius modi tempora \nincidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad \nminima veniam, quis nostrum exercitationem ullam corporis suscipit \nlaboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum \niure reprehenderit qui in ea voluptate velit esse quam nihil molestiae \nconsequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?\"\n"} | ||
"\nLorem Ipsum\n\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse \ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat \nnon proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\n\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem\naccusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab \nillo inventore veritatis et quasi architecto beatae vitae dicta sunt \nexplicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit \naut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem \nsequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit \namet, consectetur, adipisci velit, sed quia non numquam eius modi tempora \nincidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad \nminima veniam, quis nostrum exercitationem ullam corporis suscipit \nlaboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum \niure reprehenderit qui in ea voluptate velit esse quam nihil molestiae \nconsequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?\"\n" |
2 changes: 1 addition & 1 deletion
2
tests/official_tests/test_cases/string_multiline_5/load_err.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 0, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/official_tests/test_cases/string_multiline_6/load_err.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lineno": 3, | ||
"colno": 0, | ||
"message": "invalid indentation" | ||
"message": "invalid indentation." | ||
} |
Oops, something went wrong.