summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 10:31:15 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit5fd713889b6bdeb27c58941b77266c9336bf7b7d (patch)
tree8b8ad1c1a0beb814aa3ad63a8790b554fb09c599 /test
parent2d0c506583d18d6f004fc117282deb2faea1d17e (diff)
downloadpardes-5fd713889b6bdeb27c58941b77266c9336bf7b7d.tar.gz
pardes-5fd713889b6bdeb27c58941b77266c9336bf7b7d.zip
ThemeSel is Themes and FontSel is Fonts; the old words still work in init files and dumps
The user asked for the plainer words. Every use is renamed: the builtins, leader paths, /commands, the docs and tutor, tests, and the themesel golden, re-recorded. An init file's ThemeSel or FontSel runs the new word and says `ThemeSel: renamed to Themes`, as ColumnTags is said; a dump naming an output pane by the old word restores it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/appearance_gallery.py8
-rw-r--r--test/output.zig10
-rw-r--r--test/snapshots/themesel.golden2
-rw-r--r--test/snapshots/themesel.snap2
4 files changed, 11 insertions, 11 deletions
diff --git a/test/appearance_gallery.py b/test/appearance_gallery.py
index bc9a7570..46b17dd9 100644
--- a/test/appearance_gallery.py
+++ b/test/appearance_gallery.py
@@ -51,7 +51,7 @@ Orchard: crisp woodland color
Dusk: intentionally soft and warm
Theme dusk
-ThemeSel: Pardes themes come first.
+Themes: Pardes themes come first.
'''
@@ -159,16 +159,16 @@ def run(args):
if args.theme_selector:
command(client, terminal, 'Collapse')
before = set(panes(client))
- command(client, right, 'ThemeSel')
+ command(client, right, 'Themes')
selector = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)),
- 'ThemeSel missing')
+ 'Themes missing')
body = client.read(f'/pane/{selector}/body').decode()
native, legacy = body.split('# Legacy and imported themes', 1)
for theme in ('forge_black', 'forge_soft', 'orchard_black'):
require('Theme ' + theme + '\n' in native, 'native contrast variant below legacy heading')
require('Theme helix\n' in legacy, 'legacy theme section missing')
require('Theme orchard' in ''.join(c[0] for c in client.screen()['cells']),
- 'ThemeSel did not open at native first entry')
+ 'Themes did not open at native first entry')
take_frame('theme-selector')
report['native_themes_first'] = True
client.write(f'/pane/{selector}/exec', b'Del\n')
diff --git a/test/output.zig b/test/output.zig
index 478f1b4a..21c02e0a 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -952,13 +952,13 @@ test "N exactly reverses n across output panes and the ring seam" {
try std.testing.expect(saw_first and saw_second);
}
-test "ThemeSel groups native themes first and skips headings in both directions" {
+test "Themes groups native themes first and skips headings in both directions" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
const source = try p.setTestFile("notes\n");
pardes.colors.setThemeIndex(p, pardes.themes.len - 1);
const original_theme = p.settings.theme;
- try std.testing.expect(p.executeBuiltinLine(0, "ThemeSel"));
+ try std.testing.expect(p.executeBuiltinLine(0, "Themes"));
const tid = source.search_pane orelse return error.MissingThemeList;
const list = p.panes[tid].?;
const content = list.file.?.content;
@@ -979,12 +979,12 @@ test "ThemeSel groups native themes first and skips headings in both directions"
for (pardes.themes[0 .. pardes.native_theme_count + 1]) |theme| {
p.update(.{ .key = .{ .cp = 'n' } });
try std.testing.expectEqual(tid, p.active);
- const selected = selectedOutputText(list) orelse return error.MissingThemeSelection;
+ const selected = selectedOutputText(list) orelse return error.MissingThemesection;
try std.testing.expectEqualStrings(theme.name, selected["Theme ".len..]);
try std.testing.expectEqual(original_theme, p.settings.theme);
}
p.update(.{ .key = .{ .cp = 'N' } });
- const previous = selectedOutputText(list) orelse return error.MissingThemeSelection;
+ const previous = selectedOutputText(list) orelse return error.MissingThemesection;
try std.testing.expectEqualStrings(pardes.themes[pardes.native_theme_count - 1].name, previous["Theme ".len..]);
p.update(.{ .key = .{ .cp = Key.tab } });
try std.testing.expectEqual(pardes.native_theme_count - 1, p.settings.theme);
@@ -999,7 +999,7 @@ test "n/N selects command outputs by whole row" {
defer p.deinit();
p.update(.{ .resize = .{ .cols = 100, .rows = 40 } });
- try std.testing.expect(p.executeBuiltinLine(p.active, "ThemeSel"));
+ try std.testing.expect(p.executeBuiltinLine(p.active, "Themes"));
const tid = p.panes[p.active].?.search_pane orelse return error.MissingThemeList;
const themes = p.panes[tid].?;
try std.testing.expect(panes.Output.fileTraits(themes.file.?.output).commands);
diff --git a/test/snapshots/themesel.golden b/test/snapshots/themesel.golden
index 8d453978..92e641f5 100644
--- a/test/snapshots/themesel.golden
+++ b/test/snapshots/themesel.golden
@@ -31,7 +31,7 @@
| 27 line 27
| 28 line 28
== snap list grid=100x31 cursor=7,3
-|3: 1 line 1 ThemeSel
+|3: 1 line 1 Themes
|16: /tmp/pardes-snap/themesel/cwd/+Themes Save Tty Collapse Del
|17: 1 # Pardes themes
|18: 2 Theme orchard
diff --git a/test/snapshots/themesel.snap b/test/snapshots/themesel.snap
index 04a95d23..2b7b03c4 100644
--- a/test/snapshots/themesel.snap
+++ b/test/snapshots/themesel.snap
@@ -1,7 +1,7 @@
# RULE: a results buffer is a list of things you can RUN, and its traits say
# what a ROW IS. Every list before this one held LOCATIONS — a row with a
# `path:LINE:COL` word inside it — so n/N select that word and Enter Looks it.
-# `SPC t t` (ThemeSel) opens the first one whose rows are COMMANDS: `Theme
+# `SPC t t` (Themes) opens the first one whose rows are COMMANDS: `Theme
# <name>`, exactly the line you would type, with no path in it to pick out, so
# n/N select the WHOLE ROW. One motion, two grains, and the same split either
# way — the step only SELECTS, and Tab (Exec, or the middle button, which is