diff options
Diffstat (limited to 'tests/exec.t')
-rwxr-xr-x | tests/exec.t | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/exec.t b/tests/exec.t index 05aac98..941e0c0 100755 --- a/tests/exec.t +++ b/tests/exec.t @@ -5,6 +5,9 @@ is(it::exec("echo gna"), "gna\n", "basic exec"); is(it::exec("echo {arg}", array('arg' => 'gna')), "gna\n", "exec with argument"); +is(it::shell_command("echo {arg}", array('arg' => 'gna07,-:blah')), "echo gna07,-:blah", "don't quote arguments with only whitelistes characters"); +is(it::shell_command("echo {arg}", array('arg' => '2>&1')), "echo '2>&1'", "quote arguments with dangerous characters"); +is(it::shell_command("echo {arg}", array('arg' => '')), "echo ''", "quote empty arguments"); foreach (array("", "C", "de_CH", "de_CH.utf8") as $locale) { setlocale(LC_ALL, $locale); |