From 11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 25 Jan 2026 18:16:24 +0900 Subject: implement string literals --- src/root.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/root.zig') diff --git a/src/root.zig b/src/root.zig index cce3ce5..650acdf 100644 --- a/src/root.zig +++ b/src/root.zig @@ -42,6 +42,13 @@ fn testRunMultiple(expected: []const []const u8, input: []const u8, query: []con try std.testing.expectEqual(null, try runtime.next()); } +test "literals" { + try testRun("\"hello\"", "null", "\"hello\""); + try testRun("\"\"", "null", "\"\""); + try testRun("\"hello\\nworld\"", "null", "\"hello\\nworld\""); + try testRun("\"hello\"", "{\"a\":1}", "\"hello\""); +} + test "identity filter" { try testRun("null", "null", "."); try testRun("false", "false", "."); -- cgit v1.3-1-g0d28