diff options
author | Nathan Gass | 2012-03-22 18:23:53 +0000 |
---|---|---|
committer | Nathan Gass | 2012-03-22 18:23:53 +0000 |
commit | 338cda9000356404cf2865d61787607acf67fe98 (patch) | |
tree | 3924b3e2e12a5d5ea3b40890477d5e070498543c /devel-utf8/tests/exec.t | |
parent | e0a89b408041d25b18090bfc3d596627ea930507 (diff) | |
download | itools-338cda9000356404cf2865d61787607acf67fe98.tar.gz itools-338cda9000356404cf2865d61787607acf67fe98.tar.bz2 itools-338cda9000356404cf2865d61787607acf67fe98.zip |
last remains of wrong branch itools/live/devel-utf8 removed
Diffstat (limited to 'devel-utf8/tests/exec.t')
-rwxr-xr-x | devel-utf8/tests/exec.t | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/devel-utf8/tests/exec.t b/devel-utf8/tests/exec.t deleted file mode 100755 index 689bd26..0000000 --- a/devel-utf8/tests/exec.t +++ /dev/null @@ -1,23 +0,0 @@ -#!/www/server/bin/php -qC -<?php - -# Tests for getopt in it.class - -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); - $arg = "preüpost"; - if (it::match('utf8', $locale)) - $arg = utf8_encode($arg); - is(it::exec("echo " . $arg), $arg . "\n", "exec with umlaut (locale '$locale')"); - is(it::exec("echo {arg}", array('arg' => $arg)), $arg . "\n", "exec with argument and umlaut (locale '$locale')"); -} - -is(it::_exec_quotevalue(""), "''", "empty arg needs quotes"); -is(it::_exec_quotevalue("*"), "'*'", "special chars need quotes"); -is(it::_exec_quotevalue("Aabcdef0123456789"), "Aabcdef0123456789", "simple case. tel:debug_getdata needs unquoted vals"); |