summaryrefslogtreecommitdiffstats
path: root/jq_test.c
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2014-12-12 16:58:23 -0600
committerNicolas Williams <nico@cryptonector.com>2014-12-12 17:05:16 -0600
commit2075bec60fd57169b7bf6a440bcf05fbf290ffe9 (patch)
treee6f56099feddbfe40f4a0c09d38eadaa4cf47f6d /jq_test.c
parent44c23824021821ef7083e786575a13bb292768bf (diff)
Fix #647, but caused by 89791a0
Diffstat (limited to 'jq_test.c')
-rw-r--r--jq_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/jq_test.c b/jq_test.c
index c924cc16..928fb3b2 100644
--- a/jq_test.c
+++ b/jq_test.c
@@ -101,6 +101,14 @@ static void run_jq_tests(FILE *testdata) {
static void jv_test() {
+ /// JSON parser regression tests
+ {
+ jv v = jv_parse("{\"a':\"12\"}");
+ assert(jv_get_kind(v) == JV_KIND_INVALID);
+ v = jv_invalid_get_msg(v);
+ assert(strcmp(jv_string_value(v), "Expected separator between values at line 1, column 9 (while parsing '{\"a':\"12\"}')") == 0);
+ jv_free(v);
+ }
/// Arrays and numbers
{
jv a = jv_array();