@@ -109,35 +109,33 @@ if ($code -eq -99) { Fail-Test "--stdout exits 0 or 1 (timeout after ${TIMEOUT_S
109109elseif ($code -le 1 ) { ok " --stdout exits 0 or 1" }
110110else { Fail- Test " --stdout exits 0 or 1" }
111111
112- match_out " --brand outputs a non-empty line" ' .' @ (" --brand" )
113- match_out " --type outputs a non-empty line" ' .' @ (" --type" )
114- match_out " --conclusion outputs a sentence" ' .' @ (" --conclusion" )
115-
116- # short-flag aliases for full-scan flags (reuse match_out to avoid duplicate scans)
117- Write-Host " "
118- Write-Host " short flag aliases (full-scan)"
119- match_out " -d outputs 0 or 1" ' ^[01]$' @ (" -d" )
120- match_out " -b outputs a non-empty line" ' .' @ (" -b" )
121- match_out " -p outputs 0-100" ' ^[0-9]+$' @ (" -p" )
122- match_out " -c outputs a sentence" ' .' @ (" -c" )
123- match_out " -t outputs a non-empty line" ' .' @ (" -t" )
112+ match_out " --detect outputs 0 or 1" ' ^[01]$' @ (" -d" )
113+ match_out " --percent outputs 0-100" ' ^[0-9]+$' @ (" -p" )
124114
125115$out , $code = invoke_bin @ (" -s" )
126116if ($code -eq -99 ) { Fail- Test " -s exits 0 or 1 (timeout after ${TIMEOUT_SECS} s)" }
127117elseif ($code -le 1 ) { ok " -s exits 0 or 1" }
128118else { Fail- Test " -s exits 0 or 1" }
129119
130- check " -a exits 0" @ (" -a" , " --detect" )
120+ # -b/-t/-c/-a: just verify the flag is recognised (pair with -n so NUMBER short-circuits
121+ # before the full detection scan, meaning no scan is triggered)
122+ check " -b recognised" @ (" -b" , " -n" )
123+ check " -t recognised" @ (" -t" , " -n" )
124+ check " -c recognised" @ (" -c" , " -n" )
125+ check " -a recognised" @ (" -a" , " -n" )
131126
132- # no-ansi strips escape codes
127+ # no-ansi: one general-output scan that also verifies brand/type/conclusion appear
133128Write-Host " "
134- Write-Host " no-ansi"
129+ Write-Host " no-ansi + general output "
135130$ansiOut , $_ = invoke_bin @ (" --no-ansi" )
136131if ($ansiOut -match ' \x1B\[' ) {
137132 Fail- Test " --no-ansi still contains ANSI escape codes"
138133} else {
139134 ok " --no-ansi output contains no ANSI escape codes"
140135}
136+ if ($ansiOut -match ' VM brand:' ) { ok " --brand produces output in general run" } else { Fail- Test " --brand missing from general output" }
137+ if ($ansiOut -match ' VM type:' ) { ok " --type produces output in general run" } else { Fail- Test " --type missing from general output" }
138+ if ($ansiOut -match ' CONCLUSION:' ) { ok " --conclusion produces output in general run" } else { Fail- Test " --conclusion missing from general output" }
141139
142140# technique count
143141Write-Host " "
0 commit comments