summaryrefslogtreecommitdiff
path: root/test/behaviour/repls.zig
blob: 44c533619bab9e5725131807d5a32846ca5609ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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)"));
}