From e81d7baf02cc8a94b2df215101647d28189e1680 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 30 Aug 2024 13:21:58 -0700 Subject: [PATCH] Add a test for https://github.com/microsoft/vcpkg-tool/pull/1473 --- azure-pipelines/end-to-end-tests-dir/upgrade.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines/end-to-end-tests-dir/upgrade.ps1 b/azure-pipelines/end-to-end-tests-dir/upgrade.ps1 index e01bfb276d..4d5a95123b 100644 --- a/azure-pipelines/end-to-end-tests-dir/upgrade.ps1 +++ b/azure-pipelines/end-to-end-tests-dir/upgrade.ps1 @@ -73,3 +73,12 @@ if (-Not ($output -match 'upgrade-test-port:[^:]+: SUCCEEDED:')) { throw "Upgrade didn't install" } + +# Also test providing a nonexistent name + +$output = Run-VcpkgAndCaptureStdErr upgrade nonexistent "--x-builtin-ports-root=$portsRoot" @commonArgs +Throw-IfNotFailed +if ($output -match 'internal error:') +{ + throw "Upgrade with a nonexistent name crashed" +}