aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/root.zig
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-01 20:43:22 +0900
committernsfisis <nsfisis@gmail.com>2026-02-03 00:13:51 +0900
commitbeff4b6048cc3783d538769a307f8e679a33894c (patch)
treebd1bd3e6aff00cf2f9030262d674adef047672ff /src/root.zig
parent7712c1d10ec45349c1cd6e66281b7d602350065d (diff)
downloadzgjq-beff4b6048cc3783d538769a307f8e679a33894c.tar.gz
zgjq-beff4b6048cc3783d538769a307f8e679a33894c.tar.zst
zgjq-beff4b6048cc3783d538769a307f8e679a33894c.zip
implement array iteration
Diffstat (limited to 'src/root.zig')
-rw-r--r--src/root.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/root.zig b/src/root.zig
index ac9c21c..c81ae61 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -392,3 +392,8 @@ test "array constructor" {
\\]
, "{\"a\":1,\"b\":2}", "[.a, [.a, [.a, .b]]]");
}
+
+test "each" {
+ try testRunMultiple(&.{ "1", "2", "3" }, "[1,2,3]", ".[]");
+ try testRunMultiple(&.{ "1", "2", "3" }, "[[1],[2],[3]]", ".[] | .[]");
+}