summaryrefslogtreecommitdiff
path: root/tests/getopt.t
diff options
context:
space:
mode:
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);
+}