Skip to content

Commit 2408315

Browse files
authored
Skip tests if Windows powershell added a BOM
1 parent 694f6c5 commit 2408315

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ if(WIN32)
3030
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_helper.ps1
3131
"if (Test-Path $args[2]) { Remove-Item -Force $args[2] } \n"
3232
"$ErrorActionPreference = \"Stop\"\n"
33+
"If ((Get-Content $args[1] | & file - | %{$_ -match \"BOM\"}) -contains $true) {\n"
34+
"echo 'Skipped due to wrong input encoding'\n"
35+
"exit 0\n"
36+
"}\n"
3337
"Get-Content $args[1] | & $args[0]\n"
3438
"If ((Get-Content $args[2] | %{$_ -match \"FATAL\"}) -contains $true) {\n"
3539
"echo Error\n"

0 commit comments

Comments
 (0)