Skip to content

Commit 998e600

Browse files
committed
add windows powershell tests to unit tests pipeline
1 parent 427e1f6 commit 998e600

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/unit-tests/test_main.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ foreach ($testFile in $testFiles) {
3737
# Run the test file
3838
$result = & $testPath
3939

40-
if ($LASTEXITCODE -eq 0 -and $?) {
40+
# Only check $LASTEXITCODE since $? might be false even when tests pass
41+
if ($null -eq $LASTEXITCODE -or $LASTEXITCODE -eq 0) {
4142
Write-Host "$script:GREEN`Tests passed in: $testFile$script:NC"
4243
$passedCount++
4344
}

0 commit comments

Comments
 (0)