diff options
author | Timothy J. Wood <tjw@omnigroup.com> | 2009-02-25 13:26:14 -0800 |
---|---|---|
committer | Timothy J. Wood <tjw@omnigroup.com> | 2009-02-25 13:26:14 -0800 |
commit | 678b4261d41e2ef1a98958fba897135c2ba0a506 (patch) | |
tree | 8601b361f1bc3373ef65df2b29a16dbae3b82022 | |
parent | bfcb50a1e1c5181f4e8373a5fbc74b02649b73bf (diff) | |
download | yajl-678b4261d41e2ef1a98958fba897135c2ba0a506.tar.gz |
Added test cases where one of the top-level constants is followed by garbage.
These succeed right now, but that seems questionable since the the following
character is part of the same token. A failure *would* be issued if the
parser knew that the stream was at an end, I think. Still, the user of
the library might erroneously handle the null/true/false when yajl could
emit the error sooner.
-rw-r--r-- | test/cases/false_then_garbage.json | 1 | ||||
-rw-r--r-- | test/cases/false_then_garbage.json.gold | 1 | ||||
-rw-r--r-- | test/cases/null_then_garbage.json | 1 | ||||
-rw-r--r-- | test/cases/null_then_garbage.json.gold | 1 | ||||
-rw-r--r-- | test/cases/true_then_garbage.json | 1 | ||||
-rw-r--r-- | test/cases/true_then_garbage.json.gold | 1 |
6 files changed, 6 insertions, 0 deletions
diff --git a/test/cases/false_then_garbage.json b/test/cases/false_then_garbage.json new file mode 100644 index 0000000..78f4e96 --- /dev/null +++ b/test/cases/false_then_garbage.json @@ -0,0 +1 @@ +falsex
\ No newline at end of file diff --git a/test/cases/false_then_garbage.json.gold b/test/cases/false_then_garbage.json.gold new file mode 100644 index 0000000..c91690a --- /dev/null +++ b/test/cases/false_then_garbage.json.gold @@ -0,0 +1 @@ +bool: false diff --git a/test/cases/null_then_garbage.json b/test/cases/null_then_garbage.json new file mode 100644 index 0000000..7b65b35 --- /dev/null +++ b/test/cases/null_then_garbage.json @@ -0,0 +1 @@ +nullx diff --git a/test/cases/null_then_garbage.json.gold b/test/cases/null_then_garbage.json.gold new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/test/cases/null_then_garbage.json.gold @@ -0,0 +1 @@ +null diff --git a/test/cases/true_then_garbage.json b/test/cases/true_then_garbage.json new file mode 100644 index 0000000..9151612 --- /dev/null +++ b/test/cases/true_then_garbage.json @@ -0,0 +1 @@ +truex
\ No newline at end of file diff --git a/test/cases/true_then_garbage.json.gold b/test/cases/true_then_garbage.json.gold new file mode 100644 index 0000000..3283d03 --- /dev/null +++ b/test/cases/true_then_garbage.json.gold @@ -0,0 +1 @@ +bool: true |