summaryrefslogtreecommitdiff
path: root/examples/live/test
diff options
context:
space:
mode:
Diffstat (limited to 'examples/live/test')
-rw-r--r--examples/live/test/grammar.zig2
-rw-r--r--examples/live/test/live.script13
2 files changed, 14 insertions, 1 deletions
diff --git a/examples/live/test/grammar.zig b/examples/live/test/grammar.zig
index 497c05d..2fa982f 100644
--- a/examples/live/test/grammar.zig
+++ b/examples/live/test/grammar.zig
@@ -41,7 +41,7 @@ test "the grammar and Lang.zig agree: both take a program, both refuse a broken
}) |case| {
const tree = parser.parseString(case.text, null) orelse return error.NoTree;
defer tree.destroy();
- const lang = Lang.compile(case.text) == .program;
+ const lang = Lang.compile(case.text, null) == .program;
std.testing.expectEqual(case.grammar, !tree.rootNode().hasError()) catch |e| {
std.debug.print("the grammar on {s}\n", .{case.text});
return e;
diff --git a/examples/live/test/live.script b/examples/live/test/live.script
index ecf3d77..a06ed97 100644
--- a/examples/live/test/live.script
+++ b/examples/live/test/live.script
@@ -68,3 +68,16 @@ console stop
expect ed.front 53
expect ed.back 0
expect color.code[3].op hsv
+# Hear this: Alt-o from the 2 of 220 to the number, then to `tau * 220`,
+# which alone is heard and seen until the next key.
+type gg
+type 16l
+hold left_alt
+key o
+expect probe.len 1
+key o
+release left_alt
+expect probe.len 3
+expect probe.code[2].op mul
+key escape
+expect probe.len 0