aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg-test
diff options
context:
space:
mode:
authornicole mazzuca <mazzucan@outlook.com>2021-01-12 09:26:42 -0800
committerGitHub <noreply@github.com>2021-01-12 09:26:42 -0800
commit94b9db927c33e0e6ec358893f29ddbc49423cac0 (patch)
treed434f475dd19cfee1b0100efd477ee95ecb200e0 /toolsrc/src/vcpkg-test
parent331f87775cd53d6ab36545b0a1ba55e051b090f9 (diff)
downloadvcpkg-94b9db927c33e0e6ec358893f29ddbc49423cac0.tar.gz
vcpkg-94b9db927c33e0e6ec358893f29ddbc49423cac0.zip
[vcpkg] Add a different way to use CommandBuilder, support InWorkingDirectory (#15583)
* [vcpkg] Add stuff to the system.process API * CmdLineBuilder - add rvalue overloads * Add InWorkingDirectory support * remove `&&` outside of system.process.cpp * minor CR * move the non-InWorkingDirectory functions into the header as inline * Update toolsrc/include/vcpkg/base/system.process.h Co-authored-by: Billy O'Neal <bion@microsoft.com> * fix CmdLineBuilder name * moar bugfixin * fix native() location Co-authored-by: Billy O'Neal <bion@microsoft.com>
Diffstat (limited to 'toolsrc/src/vcpkg-test')
-rw-r--r--toolsrc/src/vcpkg-test/system.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/toolsrc/src/vcpkg-test/system.cpp b/toolsrc/src/vcpkg-test/system.cpp
index e7f8aca8f..7ebc621f0 100644
--- a/toolsrc/src/vcpkg-test/system.cpp
+++ b/toolsrc/src/vcpkg-test/system.cpp
@@ -135,13 +135,15 @@ TEST_CASE ("cmdlinebuilder", "[system]")
cmd.string_arg("hello world!");
cmd.string_arg("|");
cmd.string_arg(";");
- REQUIRE(cmd.extract() == "relative/path.exe abc \"hello world!\" \"|\" \";\"");
+ REQUIRE(cmd.command_line() == "relative/path.exe abc \"hello world!\" \"|\" \";\"");
+
+ cmd.clear();
cmd.path_arg(fs::u8path("trailing\\slash\\"));
cmd.string_arg("inner\"quotes");
#ifdef _WIN32
- REQUIRE(cmd.extract() == "\"trailing\\slash\\\\\" \"inner\\\"quotes\"");
+ REQUIRE(cmd.command_line() == "\"trailing\\slash\\\\\" \"inner\\\"quotes\"");
#else
- REQUIRE(cmd.extract() == "\"trailing\\\\slash\\\\\" \"inner\\\"quotes\"");
+ REQUIRE(cmd.command_line() == "\"trailing\\\\slash\\\\\" \"inner\\\"quotes\"");
#endif
}