1 parent
0f5345e515
commit
4ef04e5b5c
2 files changed
+37
-27
No files matched your search
@@ -111,7 +111,6 @@ fi
|
||||
## into tests/all.test
|
||||
|
||||
cat > $d/expected <<EOF
|
||||
ignoring parse error: Potentially truncated top-level numeric value at line 1, column 2
|
||||
ignoring parse error: Truncated value at line 2, column 5
|
||||
ignoring parse error: Truncated value at line 2, column 25
|
||||
ignoring parse error: Truncated value at line 2, column 41
|
||||
@@ -120,7 +119,6 @@ printf '1\0362 3\n[0,1\036[4,5]true"ab"{"c":4\036{}{"d":5,"e":6"\036false\n'|$VA
|
||||
cmp $d/out $d/expected
|
||||
|
||||
cat > $d/expected <<EOF
|
||||
ignoring parse error: Potentially truncated top-level numeric value at line 1, column 2
|
||||
ignoring parse error: Truncated value at line 2, column 5
|
||||
ignoring parse error: Truncated value at line 2, column 25
|
||||
ignoring parse error: Truncated value at line 3, column 1
|
||||
@@ -131,21 +129,21 @@ cmp $d/out $d/expected
|
||||
# Note that here jq sees no inputs at all but it still succeeds because
|
||||
# --seq ignores parse errors
|
||||
cat > $d/expected <<EOF
|
||||
ignoring parse error: Unfinished string at EOF at line 1, column 4
|
||||
ignoring parse error: Unfinished abandoned text at EOF at line 1, column 4
|
||||
EOF
|
||||
printf '"foo'|./jq -ce --seq . > $d/out 2>&1
|
||||
cmp $d/out $d/expected
|
||||
|
||||
# Numeric values truncated by EOF are ignored
|
||||
cat > $d/expected <<EOF
|
||||
ignoring parse error: Potentially truncated top-level numeric value at EOF at line 1, column 1
|
||||
ignoring parse error: Unfinished abandoned text at EOF at line 1, column 1
|
||||
EOF
|
||||
printf '1'|./jq -ce --seq . > $d/out 2>&1
|
||||
cmp $d/out $d/expected
|
||||
|
||||
cat > $d/expected <<EOF
|
||||
EOF
|
||||
printf '1\n'|./jq -ces --seq '. == [1]' >/dev/null 2> $d/out
|
||||
printf '1\n'|./jq -cen --seq '[inputs] == []' >/dev/null 2> $d/out
|
||||
cmp $d/out $d/expected
|
||||
|
||||
## Test streaming parser
|
||||
|
||||
Reference in new issue
Block a user