Sequence parser: wait for RS on startup (fix #687)

Per-RFC7464.
This commit is contained in:
Nicolas Williams committed 2015-06-17 11:24:34 -05:00
1 parent 0f5345e515
commit 4ef04e5b5c
2 files changed
+37 -27

No files matched your search

+3 -5
View File
@@ -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