summaryrefslogtreecommitdiff
path: root/json-glib/tests/path.c
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2013-01-11 15:03:08 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2013-01-11 17:24:06 +0000
commite348b1fa88823ddb18fb8d2a2d1acea94c9f9448 (patch)
treec90cf7d9ac592205ade45ccede4ce038d2ba7396 /json-glib/tests/path.c
parentf33c209e0f895b52afae5742a72cfacf104116bc (diff)
downloadjson-glib-e348b1fa88823ddb18fb8d2a2d1acea94c9f9448.tar.gz
path: Fix get all array elements with wildcard
Using the same data as in tests, asking for $['store']['book'][*] JSON path should return all the book objects in an array. But that array is returned inside another array, dupped several times. https://bugzilla.gnome.org/show_bug.cgi?id=691557
Diffstat (limited to 'json-glib/tests/path.c')
-rw-r--r--json-glib/tests/path.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/json-glib/tests/path.c b/json-glib/tests/path.c
index 7b1f654..712b65d 100644
--- a/json-glib/tests/path.c
+++ b/json-glib/tests/path.c
@@ -79,6 +79,10 @@ static const struct {
"$..book[:2]",
"[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of the Century\",\"price\":\"8.95\"},{\"category\":\"fiction\",\"author\":\"Evelyn Waugh\",\"title\":\"Sword of Honour\",\"price\":\"12.99\"}]"
},
+ {
+ "$['store']['book'][*]",
+ "[{\"category\":\"reference\",\"author\":\"Nigel Rees\",\"title\":\"Sayings of the Century\",\"price\":\"8.95\"},{\"category\":\"fiction\",\"author\":\"Evelyn Waugh\",\"title\":\"Sword of Honour\",\"price\":\"12.99\"},{\"category\":\"fiction\",\"author\":\"Herman Melville\",\"title\":\"Moby Dick\",\"isbn\":\"0-553-21311-3\",\"price\":\"8.99\"},{\"category\":\"fiction\",\"author\":\"J. R. R. Tolkien\",\"title\":\"The Lord of the Rings\",\"isbn\":\"0-395-19395-8\",\"price\":\"22.99\"}]"
+ },
};
static void