summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2023-12-13 21:24:52 +0100
committerNico Williams <nico@cryptonector.com>2024-01-16 16:08:03 -0600
commit71e7bcdfc154ddbd27b80c840f35b52cb9d66215 (patch)
tree95e5fdf357bb52c5755883747224a6906b8c93aa /tests
parentf954e82b144429972a13a95acdf0297e8cc67fa3 (diff)
Revert "lexer: temporarily revert #\ patch; keep CR in comment bug fix"
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shtest18
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