Skip to content

Commit f5992c1

Browse files
committed
WIP
1 parent 9d61370 commit f5992c1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/chilli/context.zig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,14 @@ test "context: getArgsAs for typed variadic" {
343343
test "context: getFlag reads env var via debug_threaded_io environ" {
344344
// Verify that the Environ.getPosix lookup through debug_threaded_io
345345
// can find a real environment variable (PATH is always set on POSIX).
346+
//
347+
// `canLookupEnv()` in context.zig returns false on Windows/WASI/etc.,
348+
// so the lookup is skipped and getFlag falls back to the default on
349+
// those targets. This test only exercises the POSIX lookup path; the
350+
// sibling tests above and below cover the default-fallback path that
351+
// is what Windows runs through unconditionally.
352+
if (comptime !canLookupEnv()) return;
353+
346354
const allocator = testing.allocator;
347355
var cmd = try command.Command.init(allocator, .{ .name = "test", .description = "", .exec = dummyExec });
348356
defer cmd.deinit();

0 commit comments

Comments
 (0)