diff options
author | Nathan Gass | 2011-06-07 13:54:32 +0000 |
---|---|---|
committer | Nathan Gass | 2011-06-07 13:54:32 +0000 |
commit | 854b10224fb8735c6fc85bc426aa223faedb2b2f (patch) | |
tree | 1112bcce3e7c18addbebc8aa20f56e6cc39dc1ed /tests | |
parent | f0b4f11590f4091323cfd0006c1e5c55404478ab (diff) | |
download | itools-854b10224fb8735c6fc85bc426aa223faedb2b2f.tar.gz itools-854b10224fb8735c6fc85bc426aa223faedb2b2f.tar.bz2 itools-854b10224fb8735c6fc85bc426aa223faedb2b2f.zip |
add some it::shell_command tests for new complex behaviour
Diffstat (limited to 'tests')
-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); |