From c6d5726fadd3ddbab6fcf3ffd6f93ba98ee5faef Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 6 Apr 2022 17:47:13 +0200 Subject: [PATCH 1/3] Modify BOM test --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5214d9cabc..a98422454a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -30,7 +30,7 @@ if(WIN32) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_helper.ps1 "if (Test-Path $args[2]) { Remove-Item -Force $args[2] } \n" "$ErrorActionPreference = \"Stop\"\n" -"If ((Get-Content $args[1] | & file - | %{$_ -match \"BOM\"}) -contains $true) {\n" +"If ((Get-Content $args[1] | %{$_ -match \"\\xEF\\xBB\\xBF\" }) -contains $true) {\n" "echo 'Skipped due to wrong input encoding'\n" "exit 0\n" "}\n" From d082e47980837d2fdeebe840a5f740768fd8408f Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 6 Apr 2022 18:18:16 +0200 Subject: [PATCH 2/3] Update CMakeLists.txt --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a98422454a..0733bd4e6d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -30,7 +30,7 @@ if(WIN32) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_helper.ps1 "if (Test-Path $args[2]) { Remove-Item -Force $args[2] } \n" "$ErrorActionPreference = \"Stop\"\n" -"If ((Get-Content $args[1] | %{$_ -match \"\\xEF\\xBB\\xBF\" }) -contains $true) {\n" +"If ((Get-Content $args[1] | & type | %{$_ -match \"\\xEF\\xBB\\xBF\" }) -contains $true) {\n" "echo 'Skipped due to wrong input encoding'\n" "exit 0\n" "}\n" From 288f95dc98dac6e2760475aaf00cca35d1d47b31 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 6 Apr 2022 21:37:08 +0200 Subject: [PATCH 3/3] Update CMakeLists.txt --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0733bd4e6d..0d61173651 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -30,7 +30,7 @@ if(WIN32) FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_helper.ps1 "if (Test-Path $args[2]) { Remove-Item -Force $args[2] } \n" "$ErrorActionPreference = \"Stop\"\n" -"If ((Get-Content $args[1] | & type | %{$_ -match \"\\xEF\\xBB\\xBF\" }) -contains $true) {\n" +"If ((Get-Content $args[1] | & findstr \"\\xEF\\xBB\\xBF\" | %{$_ -match \"\\xEF\\xBB\\xBF\" }) -contains $true) {\n" "echo 'Skipped due to wrong input encoding'\n" "exit 0\n" "}\n"