aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2009-10-29 15:42:05 +0200
committerPetri Lehtinen <petri@digip.org>2009-10-29 15:45:16 +0200
commitd3959a8ce79bb30a8b39a275a4682885e97d17cc (patch)
treea8ea0cfd944b6212065b7ba6eba456bc4e8ca29f /test
parentf243930b6843295b81a4e4025497e40f19ff53ac (diff)
downloadjansson-d3959a8ce79bb30a8b39a275a4682885e97d17cc.zip
jansson-d3959a8ce79bb30a8b39a275a4682885e97d17cc.tar.gz
jansson-d3959a8ce79bb30a8b39a275a4682885e97d17cc.tar.bz2
load: Parse a badly put - sign correctly
Thanks to Manolis Delakis for reporting.
Diffstat (limited to 'test')
-rw-r--r--test/testdata/invalid17
-rw-r--r--test/testdata/invalid-strip17
2 files changed, 32 insertions, 2 deletions
diff --git a/test/testdata/invalid b/test/testdata/invalid
index 1a70422..7fede67 100644
--- a/test/testdata/invalid
+++ b/test/testdata/invalid
@@ -167,7 +167,22 @@ too big negative integer near '-123123123123123'
====
1
invalid token near 'troo'
-==== invalid-escap ====
+==== minus-sign-without-number ====
+[-foo]
+====
+1
+invalid token near '-'
+==== invalid-negative-integerr ====
+[-123foo]
+====
+1
+']' expected near 'foo'
+==== invalid-negative-real ====
+[-123.123foo]
+====
+1
+']' expected near 'foo'
+==== invalid-escape ====
["\a <-- invalid escape"]
====
1
diff --git a/test/testdata/invalid-strip b/test/testdata/invalid-strip
index 8b4a574..1efdc25 100644
--- a/test/testdata/invalid-strip
+++ b/test/testdata/invalid-strip
@@ -167,7 +167,22 @@ too big negative integer near '-123123123123123'
====
1
invalid token near 'troo'
-==== invalid-escap ====
+==== minus-sign-without-number ====
+[-foo]
+====
+1
+invalid token near '-'
+==== invalid-negative-integerr ====
+[-123foo]
+====
+1
+']' expected near 'foo'
+==== invalid-negative-real ====
+[-123.123foo]
+====
+1
+']' expected near 'foo'
+==== invalid-escape ====
["\a <-- invalid escape"]
====
1