diff options
Diffstat (limited to 'test/behaviour')
| -rw-r--r-- | test/behaviour/columns_and_tags.zig | 16 | ||||
| -rw-r--r-- | test/behaviour/look_and_exec.zig | 4 | ||||
| -rw-r--r-- | test/behaviour/modes.zig | 6 | ||||
| -rw-r--r-- | test/behaviour/mouse.zig | 2 | ||||
| -rw-r--r-- | test/behaviour/tags.zig | 24 |
5 files changed, 26 insertions, 26 deletions
diff --git a/test/behaviour/columns_and_tags.zig b/test/behaviour/columns_and_tags.zig index 22f55774..d5820610 100644 --- a/test/behaviour/columns_and_tags.zig +++ b/test/behaviour/columns_and_tags.zig @@ -57,11 +57,11 @@ test "columns-and-tags: Newcol makes an empty column with the keyboard on its ta const left, const col = .{ try s.column(0), try s.column(1) }; try expectEqualStrings(s.at("{d}:{d} {d}:", .{ left, first, col }), try s.columns()); try s.expect("/focus", ""); - try s.write(s.at("/pane/{d}/exec", .{first}), "Tty\n"); + try s.write(s.at("/pane/{d}/exec", .{first}), "Term\n"); const shell = try s.focused(); try expectEqualStrings(s.at("{d}:{d} {d}:{d}", .{ left, first, col, shell }), try s.columns()); - // The next Tty splits as it always has: nothing is empty any more. - try s.write(s.at("/pane/{d}/exec", .{shell}), "Tty\n"); + // The next Term splits as it always has: nothing is empty any more. + try s.write(s.at("/pane/{d}/exec", .{shell}), "Term\n"); try expectEqualStrings(s.at("{d}:{d} {d}:{d},{d}", .{ left, first, col, shell, try s.focused() }), try s.columns()); } @@ -160,7 +160,7 @@ test "columns-and-tags: New is a column tag's word, in no pane's tag nor the wor var words = std.mem.tokenizeScalar(u8, tag, ' '); while (words.next()) |word| try std.testing.expect(!std.mem.eql(u8, word, "New")); } - try expectEqualStrings("New Tty Find Grep Joincol Delcol", try s.read(s.at("/col/{d}/tag", .{try s.column(0)}))); + try expectEqualStrings("New Term Find Grep Joincol Delcol", try s.read(s.at("/col/{d}/tag", .{try s.column(0)}))); } test "columns-and-tags: a click past a column tag's text types after it, a newline typed there a space, and a long tag scrolls to its caret" { @@ -168,12 +168,12 @@ test "columns-and-tags: a click past a column tag's text types after it, a newli defer s.deinit(); const tag = s.at("/col/{d}/tag", .{try s.column(0)}); // Its row, then the pane's tag: the column's stays one row. - const rows = " New Tty Find Grep Joincol Delcol"; + const rows = " New Term Find Grep Joincol Delcol"; try std.testing.expect(std.mem.indexOf(u8, try s.screen(), rows ++ " ") != null); try s.click("Delcol", 20, 1); // A clicked tag is in normal mode: `i` types where it was clicked. try s.keys("i\nSnarf"); - try expectEqualStrings("New Tty Find Grep Joincol Delcol Snarf", try s.read(tag)); + try expectEqualStrings("New Term Find Grep Joincol Delcol Snarf", try s.read(tag)); try std.testing.expect(std.mem.indexOf(u8, try s.screen(), rows ++ " Snarf ") != null); // The pane's tag on the row right under it: the column's is one row. try std.testing.expectEqual((try s.where(rows))[1] + 1, (try s.where("/test.txt Save"))[1]); @@ -265,7 +265,7 @@ test "columns-and-tags: a column tag lights the word under the mouse, is clicked try s.write("/mousein", s.at("m {d} 1 0\n", .{x})); const lit = try s.bg(x, 1); try std.testing.expect(!std.mem.eql(u8, plain, lit)); - try expectEqualStrings(plain, try s.bg(x + 4, 1)); // Tty, another word + try expectEqualStrings(plain, try s.bg(x + 4, 1)); // Term, another word // Pressed, the keyboard is on the tag, its caret where it was pressed. try s.write("/mousein", s.at("m {d} 1 1\n", .{x})); try s.expect("/focus", ""); @@ -277,7 +277,7 @@ test "columns-and-tags: a column tag lights the word under the mouse, is clicked try std.testing.expect(!std.mem.eql(u8, lit, try s.bg(x + 4, 1))); // A clicked tag is in normal mode: `i` types at its caret. try s.keys("\u{F00D}iHelp "); - try std.testing.expect(std.mem.startsWith(u8, try s.read(tag), "Help New Tty")); + try std.testing.expect(std.mem.startsWith(u8, try s.read(tag), "Help New Term")); try std.testing.expectEqual(x + 5, (try s.cursor()).?[0]); // A tag one short of its room: its caret at the end is drawn on the // last cell, and one more letter scrolls the text, never the caret. diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig index c46ca394..ee9554cc 100644 --- a/test/behaviour/look_and_exec.zig +++ b/test/behaviour/look_and_exec.zig @@ -135,7 +135,7 @@ test "look-and-exec: look and exec read back what the last command touched, a ct try s.write("/exec", "Msg first\n"); try s.expect("/exec", s.at("{d}\n", .{n})); // A pane made through ctl is what both read next, not the Msg's pane. - try s.write(s.at("/pane/{d}/ctl", .{n}), "Tty\n"); + try s.write(s.at("/pane/{d}/ctl", .{n}), "Term\n"); const made = try s.focused(); try std.testing.expect(made != n); try s.expect("/exec", s.at("{d}\n", .{made})); @@ -159,7 +159,7 @@ test "look-and-exec: a line starting with # runs as nothing at an exec or a ctl, const log = try s.read("/log"); const col = std.mem.sliceTo(try s.read("/layout"), ' '); for ([_][]const u8{ "/exec", s.at("/pane/{d}/exec", .{n}), "/ctl", s.at("/pane/{d}/ctl", .{n}), s.at("/col/{s}/ctl", .{col}) }) |path| - try s.write(path, "# Platform: tty\n # indented too\n"); + try s.write(path, "# Platform: tui\n # indented too\n"); try s.expect("/index", index); try s.expect("/log", log); } diff --git a/test/behaviour/modes.zig b/test/behaviour/modes.zig index ba792086..961ca788 100644 --- a/test/behaviour/modes.zig +++ b/test/behaviour/modes.zig @@ -32,7 +32,7 @@ test "modes: Esc in a column or the workspace tag gives the keyboard back to a p var s = try Session.initFile(std.testing.allocator, "x\n"); defer s.deinit(); _ = try s.newPane(); - for ([_][]const u8{ "New Tty", "Newcol" }) |tag| { + for ([_][]const u8{ "New Term", "Newcol" }) |tag| { const was = try s.focused(); // A click puts the tag in normal mode, the keyboard there; Esc is // out of it. @@ -96,7 +96,7 @@ test "modes: Esc back into a file leaves its view where it was, and a look centr // The other arm still centres: a look's `:NN`. const line = 60; try s.write(s.at("/pane/{d}/look", .{doc}), s.at(":{d}\n", .{line})); - const rows = (try s.where("Tty Save Mode"))[1] - (try s.where("/test.txt"))[1] - 1; + const rows = (try s.where("Term Save Mode"))[1] - (try s.where("/test.txt"))[1] - 1; // Drawn mid-pane, a row either way. const drawn_at = line - try topLine(&s, "/test.txt"); try std.testing.expect(drawn_at + 1 >= rows / 2 and drawn_at <= rows / 2 + 1); @@ -468,7 +468,7 @@ test "modes: hopping between two panes by Esc, window mode or a click makes no p try expectEqual(want, try s.focused()); } const doc_row = (try s.where("row"))[1]; - const shell_row = (try s.where("Tty Save Mode"))[1] + 1; + const shell_row = (try s.where("Term Save Mode"))[1] + 1; for (0..8) |_| { const other = if (try s.focused() == doc) shell else doc; const row = if (other == doc) doc_row else shell_row; diff --git a/test/behaviour/mouse.zig b/test/behaviour/mouse.zig index d7da46e8..a0ac7a23 100644 --- a/test/behaviour/mouse.zig +++ b/test/behaviour/mouse.zig @@ -129,7 +129,7 @@ test "mouse: a B1 sweep over several lines is a stream, as acme's, in a body and const tx, const ty = try s.where("Collapse"); const lx, const ly = try s.where("Look Edit"); try mouse(&s, "m {d} {d} 1\nm {d} {d} 1\nm {d} {d} 3\nm {d} {d} 0\n", .{ tx + 3, ty, lx + 1, ly, lx + 1, ly, lx + 1, ly }); - try s.expect(tag, "/test.txt Save Tty Colok Edit"); + try s.expect(tag, "/test.txt Save Term Colok Edit"); } test "mouse: a click on either half of a wide character lands before it, in the text and on a tag's path, and the caret steps over it whole" { diff --git a/test/behaviour/tags.zig b/test/behaviour/tags.zig index 8609e134..71faed3a 100644 --- a/test/behaviour/tags.zig +++ b/test/behaviour/tags.zig @@ -41,9 +41,9 @@ test "tags: ms and md edit a tag's own text, and the text the edit made is read defer s.deinit(); const n = try s.focused(); try s.keys(":miwms("); - try std.testing.expectEqualStrings("/test.txt (Save) Tty Collapse Del", try tag(&s, n)); + try std.testing.expectEqualStrings("/test.txt (Save) Term Collapse Del", try tag(&s, n)); try s.keys("md("); - try std.testing.expectEqualStrings("/test.txt Save Tty Collapse Del", try tag(&s, n)); + try std.testing.expectEqualStrings("/test.txt Save Term Collapse Del", try tag(&s, n)); } test "tags: the keyboard reaches a tag's path, which it can select and yank but not edit" { @@ -66,7 +66,7 @@ test "tags: the keyboard reaches a tag's path, which it can select and yank but try s.expect(s.at("/pane/{d}/name", .{n}), "/test.txt\n"); // After the path, the text is the tag's own to edit. try s.keys(":A!\x1b"); - try std.testing.expectEqualStrings("/test.txt Save Tty Collapse Del!", try tag(&s, n)); + try std.testing.expectEqualStrings("/test.txt Save Term Collapse Del!", try tag(&s, n)); // What it yanked was the path. try s.keys(":P"); try s.expect(s.at("/pane/{d}/body", .{n}), "/test.txtbody\n"); @@ -102,7 +102,7 @@ test "tags: a tag remembers its cursor, starts on Save, and a click moves it" { try std.testing.expectEqual(@as(usize, 5), try tagCol(&s, "/second.txt")); try s.keys(":"); // A click in the tag puts its cursor there, the pane's keyboard with it. - try s.click("Save Tty", 6, 1); + try s.click("Save Term", 6, 1); try std.testing.expectEqual(first, try s.focused()); try std.testing.expectEqual(@as(usize, "/test.txt Save T".len), try tagCol(&s, "/test.txt")); // A prompt opened and left from the body leaves it there (a clicked @@ -187,7 +187,7 @@ test "tags: a tag's normal mode is the body's: motions stay in the tag and inser try s.keys(window ++ "h\n"); try std.testing.expectEqual(first, try s.focused()); try s.keys(":i\u{F018}hjklHJKL:"); - try std.testing.expectEqualStrings("/test.txt Save Tty Collapse DelhjklHJKL:", try tag(&s, first)); + try std.testing.expectEqualStrings("/test.txt Save Term Collapse DelhjklHJKL:", try tag(&s, first)); try std.testing.expect(std.mem.endsWith(u8, try s.read(s.at("/pane/{d}/ctl", .{first})), " mode:normal ")); try s.expect(s.at("/pane/{d}/body", .{first}), "body\n"); try std.testing.expectEqual(first, try s.focused()); @@ -202,7 +202,7 @@ test "tags: a tag with a newline in it is as tall as its lines, and each line is if (bottom) try s.write("/ctl", "Tagbottom on\n"); // Insert mode in a tag is a body's: Enter is a new line. try s.keys(":A\nSecond"); - try std.testing.expectEqualStrings("/test.txt Save Tty Collapse Del\nSecond", try tag(&s, n)); + try std.testing.expectEqualStrings("/test.txt Save Term Collapse Del\nSecond", try tag(&s, n)); const x, const y = try s.where("/test.txt"); try std.testing.expectEqual(.{ x, y + 1 }, try s.where("Second")); // The caret is on the second line, after what was typed. @@ -216,7 +216,7 @@ test "tags: a tag with a newline in it is as tall as its lines, and each line is try std.testing.expectEqual(.{ x + 2, y + 1 }, (try s.cursor()).?); // A clicked tag is in normal mode: `i` types where it was clicked. try s.keys("iX"); - try std.testing.expectEqualStrings("/test.txt Save Tty Collapse Del\nSeXcond", try tag(&s, n)); + try std.testing.expectEqualStrings("/test.txt Save Term Collapse Del\nSeXcond", try tag(&s, n)); try s.expect(s.at("/pane/{d}/body", .{n}), "body\n"); } } @@ -311,14 +311,14 @@ test "tags: a name drafted in the tag commits with Enter, cancels with two Escs, try clickPathEnd(&s, path); try s.keys("\x15/new name.zig"); try s.expect(name, s.at("{s}\n", .{path})); - _ = try s.where("/new name.zig Save Tty Collapse Del SyntaxBold"); + _ = try s.where("/new name.zig Save Term Collapse Del SyntaxBold"); try s.expect(s.at("/pane/{d}/body", .{n}), "original body\n"); // Esc keeps the draft pending; a second drops it. try s.keys(if (commit) "\n" else "\x1b\x1b"); try s.expect(name, if (commit) "/new name.zig\n" else "/test.txt\n"); - try std.testing.expectEqualStrings(s.at("{s} Save Tty Collapse Del SyntaxBold", .{if (commit) "/new name.zig" else "/test.txt"}), try tag(&s, n)); + try std.testing.expectEqualStrings(s.at("{s} Save Term Collapse Del SyntaxBold", .{if (commit) "/new name.zig" else "/test.txt"}), try tag(&s, n)); // The keyboard is the body's again. - try std.testing.expect((try s.cursor()).?[1] != (try s.where("Save Tty"))[1]); + try std.testing.expect((try s.cursor()).?[1] != (try s.where("Save Term"))[1]); } try std.testing.expectEqual(@as(usize, 0), s.saved); // A name alone is no edit: the pane stays clean. @@ -365,9 +365,9 @@ test "tags: middle clicking Save commits the drafted name before saving" { const n = try s.focused(); try clickPathEnd(&s, "/test.txt"); try s.keys("\x15/renamed.txt"); - try s.click("Save Tty", 0, 2); + try s.click("Save Term", 0, 2); try s.expect(s.at("/pane/{d}/name", .{n}), "/renamed.txt\n"); - try std.testing.expectEqualStrings("/renamed.txt Save Tty Collapse Del", try tag(&s, n)); + try std.testing.expectEqualStrings("/renamed.txt Save Term Collapse Del", try tag(&s, n)); try s.expect(s.at("/pane/{d}/body", .{n}), "untouched\n"); try std.testing.expectEqual(@as(usize, 1), s.saved); } |
