From 41c8fba1bc527484809613b36eb0de23f323bb74 Mon Sep 17 00:00:00 2001 From: roboo Date: Sun, 17 Jul 2016 23:12:15 +0200 Subject: Fix of mock server setup --- test/test_environment.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_environment.lua b/test/test_environment.lua index eb545a47..dcad92cf 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua @@ -41,7 +41,7 @@ end -- @param print_command boolean: print command if 'true' -- @param env_variables table: table of environment variables to export {FOO="bar", BAR="foo"} -- @return final_command string: concatenated command to execution -local function execute_helper(command, print_command, env_variables) +function test_env.execute_helper(command, print_command, env_variables) local final_command = "" if print_command then @@ -66,7 +66,7 @@ end -- In Lua5.1 os.execute returns numeric value, but in Lua5.2+ returns boolean -- @return true/false boolean: status of the command execution local function execute_bool(command, print_command, env_variables) - command = execute_helper(command, print_command, env_variables) + command = test_env.execute_helper(command, print_command, env_variables) local ok = os.execute(command) return ok == true or ok == 0 @@ -75,7 +75,7 @@ end --- Execute command and returns output of command -- @return output string: output the command execution local function execute_output(command, print_command, env_variables) - command = execute_helper(command, print_command, env_variables) + command = test_env.execute_helper(command, print_command, env_variables) local file = assert(io.popen(command)) local output = file:read('*all') -- cgit v1.2.3-55-g6feb