From faba2d104d1eb54a445fd5e391e022ca514217d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dario=20Vladovi=C4=87?= Date: Mon, 24 Aug 2020 19:05:43 +0200 Subject: [PATCH] fix(test): do NOT quote argument values for mocked invocations (#1527) Co-authored-by: Thomas O'Donnell --- src/modules/erlang.rs | 4 ++-- src/modules/php.rs | 2 +- src/utils.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/erlang.rs b/src/modules/erlang.rs index dd633c4b..8dc593c3 100644 --- a/src/modules/erlang.rs +++ b/src/modules/erlang.rs @@ -57,10 +57,10 @@ fn get_erlang_version() -> Option { &[ "-noshell", "-eval", - "'Fn=filename:join([code:root_dir(),\"releases\",erlang:system_info(otp_release),\"OTP_VERSION\"]),\ + "Fn=filename:join([code:root_dir(),\"releases\",erlang:system_info(otp_release),\"OTP_VERSION\"]),\ {ok,Content}=file:read_file(Fn),\ io:format(\"~s\",[Content]),\ - halt(0).'" + halt(0)." ] )?.stdout.trim().to_string()) } diff --git a/src/modules/php.rs b/src/modules/php.rs index ae4bdf06..b85341c0 100644 --- a/src/modules/php.rs +++ b/src/modules/php.rs @@ -24,7 +24,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { "php", &[ "-nr", - "'echo PHP_MAJOR_VERSION.\".\".PHP_MINOR_VERSION.\".\".PHP_RELEASE_VERSION;'", + "echo PHP_MAJOR_VERSION.\".\".PHP_MINOR_VERSION.\".\".PHP_RELEASE_VERSION;", ], ) { Some(php_cmd_output) => { diff --git a/src/utils.rs b/src/utils.rs index 9d480b4e..3f987af1 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -115,7 +115,7 @@ active boot switches: -d:release\n", stdout: String::from("5.26.1"), stderr: String::default(), }), - "php -nr 'echo PHP_MAJOR_VERSION.\".\".PHP_MINOR_VERSION.\".\".PHP_RELEASE_VERSION;'" => { + "php -nr echo PHP_MAJOR_VERSION.\".\".PHP_MINOR_VERSION.\".\".PHP_RELEASE_VERSION;" => { Some(CommandOutput { stdout: String::from("7.3.8"), stderr: String::default(),