From ea0289885c1fc4a8621d3a68893d3c08a2716504 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Mon, 9 Nov 2020 16:50:24 +0100 Subject: no longer ignore extra positional arguments --- test/getopt.t | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'test/getopt.t') diff --git a/test/getopt.t b/test/getopt.t index aa2de52..48f7d9d 100755 --- a/test/getopt.t +++ b/test/getopt.t @@ -38,10 +38,9 @@ getopt_ok([], false, "Missing positional argument fails"); getopt_ok(['posarg', '--argument'], false, "Missing long named argument fails"); getopt_ok(['posarg', '-a'], false, "Missing short named argument fails"); -// FIXME 2020-10 NG enable after fixme in it.class -// $GLOBALS['usage'] = it::replace('\s*\[VARARGS\]' => '', $GLOBALS['usage']); -// getopt_ok(['posargs', 'vararg'], false, "Extra positional argument fails"); -// getopt_ok(['posargs', '--zero', 'vararg'], false, "Extra positional argument fails after long argument"); -// getopt_ok(['posargs', '-0', 'vararg'], false, "Extra positional argument fails after short argument"); -// getopt_ok(['posargs', '--argument', 'value', 'vararg'], false, "Extra positional argument fails after long argument with value"); -// getopt_ok(['posargs', '-a', 'value', 'vararg'], false, "Extra positional argument fails after short argument with value"); +$GLOBALS['usage'] = it::replace(['\s*\[VARARGS\]' => ''], $GLOBALS['usage']); +getopt_ok(['posargs', 'vararg'], false, "Extra positional argument fails"); +getopt_ok(['posargs', '--zero', 'vararg'], false, "Extra positional argument fails after long argument"); +getopt_ok(['posargs', '-0', 'vararg'], false, "Extra positional argument fails after short argument"); +getopt_ok(['posargs', '--argument', 'value', 'vararg'], false, "Extra positional argument fails after long argument with value"); +getopt_ok(['posargs', '-a', 'value', 'vararg'], false, "Extra positional argument fails after short argument with value"); -- cgit v1.2.3