summaryrefslogtreecommitdiff
path: root/tests/modules/os/test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules/os/test.lua')
-rw-r--r--tests/modules/os/test.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/modules/os/test.lua b/tests/modules/os/test.lua
index e5e27456b..2b26cd939 100644
--- a/tests/modules/os/test.lua
+++ b/tests/modules/os/test.lua
@@ -91,6 +91,9 @@ function test_argv(t)
t:are_equal(os.argv('"-DTEST=\\\"hello world\\\"" "-DTEST2=\\\"hello world2\\\""'), {'-DTEST="hello world"', '-DTEST2="hello world2"'})
-- $cli '-DTEST="hello world"' '-DTEST2="hello world2"'
t:are_equal(os.argv("'-DTEST=\"hello world\"' '-DTEST2=\"hello world2\"'"), {'-DTEST="hello world"', '-DTEST2="hello world2"'})
+ -- only split
+ t:are_equal(os.argv('-DTEST="hello world"', {splitonly = true}), {'-DTEST="hello world"'})
+ t:are_equal(os.argv('-DTEST="hello world" -DTEST2="hello world2"', {splitonly = true}), {'-DTEST="hello world"', '-DTEST2="hello world2"'})
end
function test_args(t)
@@ -106,5 +109,5 @@ function test_args(t)
t:are_equal(os.args('-DTEST="hello"'), '-DTEST=\\"hello\\"')
t:are_equal(os.args({'-DTEST="hello"', '-DTEST2="hello"'}), '-DTEST=\\"hello\\" -DTEST2=\\"hello\\"')
t:are_equal(os.args('-DTEST=hello'), '-DTEST=hello') -- irreversible
--- t:are_equal(os.args({'-DTEST="hello world"', '-DTEST2="hello world2"'}), '"-DTEST=\\\"hello world\\\"" "-DTEST2=\\\"hello world2\\\""')
+ t:are_equal(os.args({'-DTEST="hello world"', '-DTEST2="hello world2"'}), '"-DTEST=\\\"hello world\\\"" "-DTEST2=\\\"hello world2\\\""')
end