diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-25 18:16:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-25 18:16:24 +0900 |
| commit | 11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f (patch) | |
| tree | 72d5f22d96e2430fe943ede11dc76c9c8dab3517 /src/root.zig | |
| parent | 48d9ec8aef4c3e7f3574346a6cf6a1fa3d725561 (diff) | |
| download | zgjq-11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f.tar.gz zgjq-11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f.tar.zst zgjq-11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f.zip | |
implement string literals
Diffstat (limited to 'src/root.zig')
| -rw-r--r-- | src/root.zig | 7 |
1 files changed, 7 insertions, 0 deletions
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", "."); |
