summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/appearance_gallery.py2
-rw-r--r--test/font_size.py6
-rw-r--r--test/output.zig26
3 files changed, 16 insertions, 18 deletions
diff --git a/test/appearance_gallery.py b/test/appearance_gallery.py
index c321c7c0..98420a15 100644
--- a/test/appearance_gallery.py
+++ b/test/appearance_gallery.py
@@ -98,7 +98,7 @@ def run(args):
return text
settings = config_report()
- require('Font effective size 18.00 pixels' in settings, 'configured font size not applied: ' + settings)
+ require(' 18.00 pixels\n' in settings, 'configured font size not applied: ' + settings)
require('TaglineSize 80' in settings, 'configured tag size missing')
(root / 'effective-config.txt').write_text(settings)
report['font_effective_pixels'] = 18
diff --git a/test/font_size.py b/test/font_size.py
index ef685a9e..878d6472 100644
--- a/test/font_size.py
+++ b/test/font_size.py
@@ -30,16 +30,16 @@ def run(args):
for serial, tag in panes(client).items():
if '/+DumpConfig ' in tag:
body = client.read(f'/pane/{serial}/body').decode()
- if f'Font effective size {size:.2f} pixels' in body:
+ if f' {size:.2f} pixels\n' in body and 'Font in use: ' in body:
return body
return None
return require(wait_for(ready), f'Font did not become {size} pixels')
initial = report(18)
- require('Font requested size 18.00' in initial, 'startup size suffix ignored')
+ require(':18.00\n' in initial, 'startup size suffix ignored')
require(args.font in initial, 'requested font missing')
execute(client, control, f'Font {args.font}:20.5')
- require('Font requested size 20.50' in report(20.5), 'fractional size ignored')
+ require(':20.50\n' in report(20.5), 'fractional size ignored')
execute(client, control, f'Font {args.font}')
report(20.5) # no suffix preserves current size
execute(client, control, f'Font {args.font}:900')
diff --git a/test/output.zig b/test/output.zig
index c67c021e..51d620c0 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -544,11 +544,12 @@ test "DumpConfig prints the startup path and refreshes its one output" {
for ([_][]const u8{
"Startup config: " ++ path ++ "\n",
"Theme orchard\n",
- "Shell effective (last spawn) (none)\n",
- "Shell pending on\n",
+ "Last shell spawned: (none)\n",
+ "Shell change pending: on\n",
+ "LocationsConfig ",
}) |line| try std.testing.expect(std.mem.indexOf(u8, out.content, line) != null);
var default_line: [256]u8 = undefined;
- try std.testing.expect(std.mem.indexOf(u8, out.content, try std.fmt.bufPrint(&default_line, "Shell requested (new panes) {s} (default)\n", .{config.defaultShell()})) != null);
+ try std.testing.expect(std.mem.indexOf(u8, out.content, try std.fmt.bufPrint(&default_line, "Shell {s}\n", .{config.defaultShell()})) != null);
try std.testing.expectEqualStrings(config.dump_config_buffer, std.fs.path.basename(out.path));
try std.testing.expectEqual(panes.Output.Origin{ .cmd = .DumpConfig }, out.output.?.from);
@@ -734,14 +735,14 @@ test "every enabled setting builtin mutates the State Config reports" {
"Tagbottom on\n",
"Debug on\n",
"Theme acme\n",
- "Shell requested (new panes) fish\n",
+ "Shell fish\n",
}) |line| try std.testing.expect(std.mem.indexOf(u8, report, line) != null);
- const transition = if (builtins.capabilities.panel_transitions)
- try std.fmt.bufPrint(&buf, "Panel transition {s}\n", .{
- config.Runtime.findAction(.{ .transition = p.settings.panel_transition }).?.word,
- })
+ const transition = if (!builtins.capabilities.panel_transitions)
+ "PanelSlide unsupported\n"
+ else if (p.settings.panel_transition == .off)
+ "PanelSlide off\n"
else
- "Panel transition unsupported\n";
+ try std.fmt.bufPrint(&buf, "{s} on\n", .{config.Runtime.findAction(.{ .transition = p.settings.panel_transition }).?.word});
try std.testing.expect(std.mem.indexOf(u8, report, transition) != null);
// A bare word turns a bundled pass on at its default level.
const scene_status = if (builtins.capabilities.scene_shaders) "2" else "unsupported";
@@ -752,14 +753,11 @@ test "every enabled setting builtin mutates the State Config reports" {
const tagline = if (!builtins.capabilities.tagline_font_size)
"TaglineSize unsupported\n"
else
- try std.fmt.bufPrint(&buf, "TaglineSize {d}{s}\n", .{
- p.settings.font.tagline_percent,
- if (builtins.capabilities.font_picker) "" else " (build-time only)",
- });
+ try std.fmt.bufPrint(&buf, "TaglineSize {d}\n", .{p.settings.font.tagline_percent});
try std.testing.expect(std.mem.indexOf(u8, report, tagline) != null);
if (chosen_font) |name| {
try std.testing.expect(std.mem.indexOf(u8, report, name) != null);
- try std.testing.expect(std.mem.indexOf(u8, report, "Font pending on\n") != null);
+ try std.testing.expect(std.mem.indexOf(u8, report, "Font change pending: on\n") != null);
}
}