From 507c009c1ee68a4c3ad100f765bf854307d5bf39 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 15 Dec 2021 10:38:34 +0200 Subject: [PATCH] test: Fix "echo" subtest in the system_tests for Windows --- src/test/system_tests.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index e97eab2c00..32aee2bce5 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -58,10 +58,8 @@ BOOST_AUTO_TEST_CASE(run_command) } { #ifdef WIN32 - // Windows requires single quotes to prevent escaping double quotes from the JSON... - const UniValue result = RunCommandParseJSON("echo '{\"success\": true}'"); + const UniValue result = RunCommandParseJSON("cmd.exe /c echo {\"success\": true}"); #else - // ... but Linux and macOS echo a single quote if it's used const UniValue result = RunCommandParseJSON("echo \"{\"success\": true}\""); #endif BOOST_CHECK(result.isObject());