From ac1baccba42f820212bdabf6d85e750ed32cef3b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 13:30:33 +0300 Subject: [PATCH] Minor fix --- __tests__/verify-dotnet.ps1 | 2 +- __tests__/verify-dotnet.sh | 39 ------------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100755 __tests__/verify-dotnet.sh diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index cd18c3a..909fc52 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'" $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" -if (-not ($version.StartsWith($args[0]))) +if (-not ($version.StartsWith($args[0].ToString())) { Write-Host "PATH='$env:PATH'" throw "Unexpected version" diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh deleted file mode 100755 index 9807577..0000000 --- a/__tests__/verify-dotnet.sh +++ /dev/null @@ -1,39 +0,0 @@ -if [ -z "$1" ]; then - echo "Must supply dotnet version argument" - exit 1 -fi - -dotnet_version="$(dotnet --version)" -echo "Found dotnet version '$dotnet_version'" -if [ -z "$(echo $dotnet_version | grep $1)" ]; then - echo "Unexpected version" - exit 1 -fi - -if [ -n "$2" ]; then - dotnet_version="$(dotnet --list-sdks)" - echo "Found dotnet version '$dotnet_version'" - if [ -z "$(echo $dotnet_version | grep $2)" ]; then - echo "Unexpected version" - exit 1 - fi -fi - -echo "Building sample csproj" -dotnet build __tests__/sample-csproj/ --no-cache || exit 1 - -echo "Testing compiled app" -sample_output=$(dotnet test __tests__/sample-csproj/ --no-build) -echo "Sample output: $sample_output" -# For Side-by-Side installs we want to run the tests twice, for a single install the tests will run once -if [ -n "$2" ]; then - if [ -z "$(echo $sample_output | grep "Test Run Successful.*Test Run Successful.")" ]; then - echo "Unexpected output" - exit 1 - fi -else - if [ -z "$(echo $sample_output | grep "Test Run Successful.")" ]; then - echo "Unexpected output" - exit 1 - fi -fi \ No newline at end of file