diff options
author | Emanuele Torre <torreemanuele6@gmail.com> | 2023-12-13 21:24:52 +0100 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2024-01-16 16:08:03 -0600 |
commit | 71e7bcdfc154ddbd27b80c840f35b52cb9d66215 (patch) | |
tree | 95e5fdf357bb52c5755883747224a6906b8c93aa /tests | |
parent | f954e82b144429972a13a95acdf0297e8cc67fa3 (diff) |
Revert "lexer: temporarily revert #\ patch; keep CR in comment bug fix"
This reverts commit 5d95791a6795bfc44380c2e6e343ee66dd891e8b.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shtest | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/shtest b/tests/shtest index 14aafbf9..06bd881f 100755 --- a/tests/shtest +++ b/tests/shtest @@ -594,6 +594,24 @@ if ! x=$($JQ -n "1 # foo$cr + 2") || [ "$x" != 1 ]; then exit 1 fi +if ! x=$($JQ -cn '[ + 1, + # foo \ + 2, + # bar \\ + 3, + 4, # baz \\\ + 5, \ + 6, + 7 + # comment \ + comment \ + comment +]') || [ "$x" != '[1,3,4,7]' ]; then + echo 'multiline comment was not handled correctly' + exit 1 +fi + # CVE-2023-50268: No stack overflow comparing a nan with a large payload $VALGRIND $Q $JQ '1 != .' <<\EOF >/dev/null Nan4000 |