Read stdin before validating required image flag in codex test stub
- Move stdin capture earlier in fake codex script setup - Ensure stdin-based assertions remain available even when image validation fails
This commit is contained in:
1 parent
70c9147c7f
commit
596e1590df
1 file changed
+1
-1
@@ -41,11 +41,11 @@ function makeFakeCodexBinary(dir: string) {
|
||||
" fi",
|
||||
" shift",
|
||||
"done",
|
||||
'stdin_content="$(cat)"',
|
||||
'if [ "$T3_FAKE_CODEX_REQUIRE_IMAGE" = "1" ] && [ "$seen_image" != "1" ]; then',
|
||||
' printf "%s\\n" "missing --image input" >&2',
|
||||
" exit 2",
|
||||
"fi",
|
||||
'stdin_content="$(cat)"',
|
||||
'if [ -n "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" ]; then',
|
||||
' printf "%s" "$stdin_content" | grep -F -- "$T3_FAKE_CODEX_STDIN_MUST_CONTAIN" >/dev/null || {',
|
||||
' printf "%s\\n" "stdin missing expected content" >&2',
|
||||
|
||||
Reference in new issue
Block a user