summaryrefslogtreecommitdiff
path: root/devel-utf8/tests/getopt.t
diff options
context:
space:
mode:
authorNathan Gass2012-03-22 18:23:53 +0000
committerNathan Gass2012-03-22 18:23:53 +0000
commit338cda9000356404cf2865d61787607acf67fe98 (patch)
tree3924b3e2e12a5d5ea3b40890477d5e070498543c /devel-utf8/tests/getopt.t
parente0a89b408041d25b18090bfc3d596627ea930507 (diff)
downloaditools-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/getopt.t')
-rwxr-xr-xdevel-utf8/tests/getopt.t29
1 files changed, 0 insertions, 29 deletions
diff --git a/devel-utf8/tests/getopt.t b/devel-utf8/tests/getopt.t
deleted file mode 100755
index 7a84588..0000000
--- a/devel-utf8/tests/getopt.t
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/www/server/bin/php -qC
-<?php
-
-# Tests for getopt in it.class
-
-$GLOBALS['usage'] = "Usage: doesnotexist.php [OPTIONS]
-Some help to a not existing program
- -h,--help the help argument
- -a,--argument=ARG the arg argument
- -0,--zero testworthy shortarg
-";
-
-function getopt_ok($argv, $exp, $name)
-{
- $_SERVER['argv'] = array_merge(array('doesnotexist.php'), $argv);
- $got = it::getopt($GLOBALS['usage']);
- return is($got['argument'], $exp, $name);
-}
-
-foreach (array("" => "blah gnaber", " (umlaute)" => "pre üäpost") as $variant => $testarg) {
- getopt_ok(array('-a', $testarg), $testarg, "Short version" . $variant);
- getopt_ok(array('--argument', $testarg), $testarg, "Long version with space" . $variant);
- getopt_ok(array("--argument=$testarg"), $testarg, "Long version with equal" . $variant);
-}
-
-$_SERVER['argv'] = array('doesnotexist.php', '-0');
-$zero_opts = it::getopt($GLOBALS['usage']);
-ok($zero_opts['zero'], '-0');
-