summaryrefslogtreecommitdiff
path: root/tests/exec.t
diff options
context:
space:
mode:
authorUrban Müller2012-11-29 14:18:19 +0000
committerUrban Müller2012-11-29 14:18:19 +0000
commitecea76684314768e352deffbe9ffadd679cbcba7 (patch)
treeaa900a5e87476dcd0d5792bbeb0d696d352195c7 /tests/exec.t
parent28d622fd07ed7d962f6827a3e07219e0bde7925e (diff)
downloaditools-ecea76684314768e352deffbe9ffadd679cbcba7.tar.gz
itools-ecea76684314768e352deffbe9ffadd679cbcba7.tar.bz2
itools-ecea76684314768e352deffbe9ffadd679cbcba7.zip
positional args in it::exec
Diffstat (limited to 'tests/exec.t')
-rwxr-xr-xtests/exec.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/exec.t b/tests/exec.t
index 9425420..349f0ed 100755
--- a/tests/exec.t
+++ b/tests/exec.t
@@ -5,6 +5,7 @@
is(it::exec("echo gna"), "gna\n", "basic exec");
is(it::exec("echo {arg}", array('arg' => 'gna')), "gna\n", "exec with argument");
+is(it::exec("echo {0}", 'gna'), "gna\n", "exec with positional 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");