diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2013-05-15 21:50:01 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-05-15 21:50:01 +0100 |
commit | e034cb033a6ba198cf22cd0601ab65bfd8c5b8dd (patch) | |
tree | 634b424a472a6efdbb7560d860fd2ddec54727fc /json-glib/tests | |
parent | 72909d28f48365f249e87ddb0ebea8ad0f0adac1 (diff) | |
download | json-glib-e034cb033a6ba198cf22cd0601ab65bfd8c5b8dd.tar.gz |
tests/path: Start adding negative tests for JsonPath
Diffstat (limited to 'json-glib/tests')
-rw-r--r-- | json-glib/tests/path.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/json-glib/tests/path.c b/json-glib/tests/path.c index d3aa74b..729a939 100644 --- a/json-glib/tests/path.c +++ b/json-glib/tests/path.c @@ -45,6 +45,20 @@ static const struct { JsonPathError error_code; } test_expressions[] = { { + "INVALID: invalid character following root", + "$ponies", + NULL, + FALSE, + JSON_PATH_ERROR_INVALID_QUERY, + }, + { + "INVALID: malformed splice", + "$.store.book[0:1:]", + NULL, + FALSE, + JSON_PATH_ERROR_INVALID_QUERY, + }, + { "Title of the first book in the store, using objct notation.", "$.store.book[0].title", "[\"Sayings of the Century\"]", |