diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 10:46:03 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 15:12:36 -0300 |
| commit | 11204e1206f7f7ffeaa861c1a442a312e563d3ed (patch) | |
| tree | f788736bf5b6a56694563b664b5db73bc54bff72 /test/output.zig | |
| parent | c9b9dad8469f5d654c31d688d7e2d93da8325f39 (diff) | |
| download | pardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.tar.gz pardes-11204e1206f7f7ffeaa861c1a442a312e563d3ed.zip | |
effects out, the post chain: Crt, Bloom, Vignette, Grain, Shader and ShaderAnimation go with src/gui/Post.zig, src/ShaderBuild.zig (the run-time glslc spawn and its watched files), shaders/post/, post.vert, bloom-down and bloom-up and their prebuilt .spv, the window's scene texture and its post-chain-only redraw (level A), the disable_scene_effects tape site and Pardes.disableSceneEffects; EffectCode goes with src/effect_sources.zig, which only embedded the effects' sources (/virtual keeps src/); the corner-click test keeps its point without a chain, the window monkey loses its Bloom axis; macOS's post-processor (ScenePostprocessor.swift, crt.ci.metal, pardes_scene) is a change of its own
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/output.zig')
| -rw-r--r-- | test/output.zig | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/test/output.zig b/test/output.zig index eb4da9b3..e998ac66 100644 --- a/test/output.zig +++ b/test/output.zig @@ -549,50 +549,7 @@ test "Config with no startup file opens a pane of its name, and Save makes its d try std.testing.expectEqual(std.Io.File.Kind.directory, made.kind); } -test "EffectCode lists readable virtual sources used by this backend" { - if (comptime !builtins.EffectCode.enabled) return; - const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true }); - defer p.deinit(); - - if (!pardes.memory.limits.embedded_sources) { - const before = p.active; - try std.testing.expect(p.executeBuiltinLine(0, "EffectCode PanelSlide")); - try std.testing.expectEqual(before, p.active); - return error.SkipZigTest; - } - try std.testing.expect(p.executeBuiltinLine(0, "EffectCode PanelSlide")); - const out = p.panes[p.active].?.file.?; - try std.testing.expectEqualStrings(config.effect_code_buffer, std.fs.path.basename(out.path)); - try std.testing.expectEqual(panes.Output.Origin{ .cmd = .EffectCode }, out.output.?.from); - try std.testing.expectEqualStrings("PanelSlide", out.output.?.arg()); - try std.testing.expect(out.content.len < 1024); - try std.testing.expect(std.mem.indexOf(u8, out.content, "/virtual/src/layout.zig\n") != null); - const backend_source = switch (platform) { - .tui => "/virtual/src/tui/panel_compositor.zig", - .gui => "/virtual/shaders/ui.vert.glsl", - .macos => "/virtual/src/macos/Sources/ScenePostprocessor.swift", - }; - try std.testing.expect(std.mem.indexOf(u8, out.content, backend_source) != null); - var paths = std.mem.tokenizeScalar(u8, out.content, '\n'); - var count: usize = 0; - while (paths.next()) |path| { - if (!std.mem.startsWith(u8, path, "/virtual/")) continue; - const expected = pardes.filesystem.sourceBytes(path["/virtual/".len..]) orelse return error.MissingEffectSource; - const bytes = try pardes.filesystem.read(p, path); - defer p.gpa.free(bytes); - try std.testing.expectEqualStrings(expected, bytes); - count += 1; - } - try std.testing.expect(count >= 3); - const report = p.active; - pardes.look.lookAt(p, report, backend_source); - try std.testing.expect(p.active != report); - const source = p.panes[p.active].?.file.?; - try std.testing.expectEqualStrings(backend_source, source.path); - try std.testing.expectEqualStrings(pardes.filesystem.sourceBytes(backend_source["/virtual/".len..]).?, source.content); -} - -test "a window's setting builtins (TaglineSize, Font, transitions, scene passes) reach the report DumpConfig writes" { +test "a window's setting builtins (TaglineSize, Font, transitions) reach the report DumpConfig writes" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true }); defer p.deinit(); p.locations_config.layout = .@"inline"; @@ -629,7 +586,7 @@ test "a window's setting builtins (TaglineSize, Font, transitions, scene passes) try std.testing.expect(p.executeBuiltinLine(p.active, "DumpConfig")); const report = p.panes[p.active].?.file.?.content; // The toggles, Theme and Shell are test/behaviour/settings.zig's, through - // the root ctl; what is left is a window's (fonts, transitions, passes). + // the root ctl; what is left is a window's (fonts, transitions). const transition = if (!builtins.viewCapabilities(p).panel_transitions) "PanelSlide unsupported\n" else if (p.settings.panel_transition == .off) @@ -637,12 +594,6 @@ test "a window's setting builtins (TaglineSize, Font, transitions, scene passes) else 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.viewCapabilities(p).scene_shaders) "2" else "unsupported"; - for ([_][]const u8{"Crt"}) |name| { - const line = try std.fmt.bufPrint(&buf, "{s} {s}\n", .{ name, scene_status }); - try std.testing.expect(std.mem.indexOf(u8, report, line) != null); - } const tagline = if (!builtins.viewCapabilities(p).tagline_font_size) "TaglineSize unsupported\n" else |
