diff options
| author | ruki <[email protected]> | 2020-03-25 22:47:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-25 10:46:52 +0800 |
| commit | 357c8504a1421dff16e3c7edc54959efd75f6654 (patch) | |
| tree | 3080c3bbd28d856925df38c2a88ff85f29a95f3b /tests/modules/os/test.lua | |
| parent | 6cea9b08790ce55bc278c0567ac0b1d00f896707 (diff) | |
improve os.args
Diffstat (limited to 'tests/modules/os/test.lua')
| -rw-r--r-- | tests/modules/os/test.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/modules/os/test.lua b/tests/modules/os/test.lua index 02be4778b..2f008edd0 100644 --- a/tests/modules/os/test.lua +++ b/tests/modules/os/test.lua @@ -69,6 +69,7 @@ function test_argv(t) t:are_equal(os.argv("aa\\bb/cc dd"), {"aa\\bb/cc", "dd"}) t:are_equal(os.argv("\"aa\\\\bb/cc dd\" ee"), {"aa\\bb/cc dd", "ee"}) t:are_equal(os.argv("\"aa\\\\bb/cc (dd)\" ee"), {"aa\\bb/cc (dd)", "ee"}) + t:are_equal(os.argv("-D__prefix__=\\\"tbox\\\""), {"-D__prefix__=\"tbox\""}) end function test_args(t) @@ -79,4 +80,5 @@ function test_args(t) t:are_equal(os.args({"aa\\bb/cc", "dd"}), "aa\\bb/cc dd") t:are_equal(os.args({"aa\\bb/cc dd", "ee"}), "\"aa\\\\bb/cc dd\" ee") t:are_equal(os.args({"aa\\bb/cc (dd)", "ee"}), "\"aa\\\\bb/cc (dd)\" ee") + t:are_equal(os.args("-D__prefix__=\"tbox\""), "-D__prefix__=\\\"tbox\\\"") end |
