summaryrefslogtreecommitdiff
path: root/tests/getopt.t
diff options
context:
space:
mode:
authorNathan Gass2008-11-11 16:25:21 +0000
committerNathan Gass2008-11-11 16:25:21 +0000
commitd5a1eeaebeb6af8f2eef494b260a6cb742013fda (patch)
tree6a8271581e3b2db73aecc9c7f5c02946cc6f3372 /tests/getopt.t
parenta4016e0ab074ca7432b8a01929d29c4a5505b6d8 (diff)
downloaditools-d5a1eeaebeb6af8f2eef494b260a6cb742013fda.tar.gz
itools-d5a1eeaebeb6af8f2eef494b260a6cb742013fda.tar.bz2
itools-d5a1eeaebeb6af8f2eef494b260a6cb742013fda.zip
some latin1 tests, debug it::exec
Diffstat (limited to 'tests/getopt.t')
-rwxr-xr-xtests/getopt.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/getopt.t b/tests/getopt.t
index 2fbe322..54a5604 100755
--- a/tests/getopt.t
+++ b/tests/getopt.t
@@ -18,7 +18,8 @@ function getopt_ok($argv, $exp, $name)
return is($got['argument'], $exp, $name);
}
-$testarg = "blah gnaber";
-getopt_ok(array('-a', $testarg), $testarg, "Short version");
-getopt_ok(array('--argument', $testarg), $testarg, "Long version with space");
-getopt_ok(array("--argument=$testarg"), $testarg, "Long version with equal");
+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);
+}