From 611e63ddfbe2a759997b73aed9ca0f98f669e22a Mon Sep 17 00:00:00 2001 From: Matthew DeGuzman Date: Tue, 10 Mar 2026 17:09:36 -0400 Subject: [PATCH] Fix Windows test failures in ls long_format and sandbox tests - basic_long.yaml, human_readable.yaml: Add stdout_contains_windows with -rw-rw-rw- since Windows doesn't support Unix group/other permission bits (chmod 0644 maps to -rw-rw-rw-) - outside_allowed_paths.yaml: Add stderr_windows matching the actual Windows error. On Windows /etc has no drive letter so it resolves as a relative path inside the sandbox temp dir, where os.Root produces "statat etc: no such file or directory". Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/scenarios/cmd/ls/long_format/basic_long.yaml | 4 ++++ tests/scenarios/cmd/ls/long_format/human_readable.yaml | 3 +++ tests/scenarios/cmd/ls/sandbox/outside_allowed_paths.yaml | 1 + 3 files changed, 8 insertions(+) diff --git a/tests/scenarios/cmd/ls/long_format/basic_long.yaml b/tests/scenarios/cmd/ls/long_format/basic_long.yaml index 282312ab..0c34cf9d 100644 --- a/tests/scenarios/cmd/ls/long_format/basic_long.yaml +++ b/tests/scenarios/cmd/ls/long_format/basic_long.yaml @@ -14,5 +14,9 @@ expect: - "-rw-r--r--" - "11" - "hello.txt" + stdout_contains_windows: + - "-rw-rw-rw-" + - "11" + - "hello.txt" stderr: "" exit_code: 0 diff --git a/tests/scenarios/cmd/ls/long_format/human_readable.yaml b/tests/scenarios/cmd/ls/long_format/human_readable.yaml index ae2a3041..69a5c354 100644 --- a/tests/scenarios/cmd/ls/long_format/human_readable.yaml +++ b/tests/scenarios/cmd/ls/long_format/human_readable.yaml @@ -13,5 +13,8 @@ expect: stdout_contains: - "-rw-r--r--" - "tiny.txt" + stdout_contains_windows: + - "-rw-rw-rw-" + - "tiny.txt" stderr: "" exit_code: 0 diff --git a/tests/scenarios/cmd/ls/sandbox/outside_allowed_paths.yaml b/tests/scenarios/cmd/ls/sandbox/outside_allowed_paths.yaml index e199ee2b..bc70f890 100644 --- a/tests/scenarios/cmd/ls/sandbox/outside_allowed_paths.yaml +++ b/tests/scenarios/cmd/ls/sandbox/outside_allowed_paths.yaml @@ -11,4 +11,5 @@ input: expect: stdout: "" stderr: "ls: cannot access '/etc': permission denied\n" + stderr_windows: "ls: cannot access '/etc': statat etc: no such file or directory\n" exit_code: 1