aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-04-26 09:48:28 -0700
committerBen Pfaff <blp@nicira.com>2012-04-26 09:48:28 -0700
commitc640c04f643f9cd9c9b88a9989590e8a02954f7f (patch)
treea9381541cb9ccc8cc4a5caf38cdfaf6e51fb85bc /tests
parent3a4548cfb2fb7e7344618f449ab9bf651ef83e6b (diff)
json: Correct position tracking in JSON parser implementations.
When json_lex_input() returns false, the parser does not consume the byte passed in. That byte will get processed again in the next iteration of the json_parser_feed() loop. Therefore, until now, this code has double-counted bytes that cause a false return from json_lex_input(). This fixes the problem. Every input byte is now counted only once. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovsdb-log.at2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ovsdb-log.at b/tests/ovsdb-log.at
index bd061105..055dc70c 100644
--- a/tests/ovsdb-log.at
+++ b/tests/ovsdb-log.at
@@ -266,7 +266,7 @@ AT_CHECK(
file: read: [0]
file: read: [1]
file: read: [2]
-file: read failed: syntax error: file: 5 bytes starting at offset 228 are not valid JSON (line 1, column 0, byte 5: syntax error at beginning of input)
+file: read failed: syntax error: file: 5 bytes starting at offset 228 are not valid JSON (line 0, column 4, byte 4: syntax error at beginning of input)
file: write:["replacement data"] successful
]], [ignore])
AT_CHECK(