summaryrefslogtreecommitdiff
path: root/test/behaviour/repls.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/repls.zig')
-rw-r--r--test/behaviour/repls.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/behaviour/repls.zig b/test/behaviour/repls.zig
new file mode 100644
index 00000000..44c53361
--- /dev/null
+++ b/test/behaviour/repls.zig
@@ -0,0 +1,11 @@
+//! docs/typ/reference.typ, REPLs <repls>.
+const std = @import("std");
+const Session = @import("session").Session;
+
+test "repls: Repl with no such language is invalid, EINVAL, and names a few whole and how many more" {
+ var s = try Session.initTerm(std.testing.allocator);
+ defer s.deinit();
+ try std.testing.expectEqual(@as(u16, 22), try s.refused(s.at("/pane/{d}/ctl", .{try s.focused()}), "Repl zzlang\n"));
+ try std.testing.expect(std.mem.indexOf(u8, s.said, "Repl: invalid language \"zzlang\"; - or one like zig ada bash c c_sharp clojure (") != null);
+ try std.testing.expect(std.mem.endsWith(u8, s.said, " more)"));
+}