From 7f7c006007c42376d711d71f42e5577d431c6b64 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 23 Mar 2015 23:25:25 -0300 Subject: Add support for space in long option assignments. Support assignments in long option in two tokens, so that ``` luarocks --only-from /foo/bar build luasocket ``` is accepted as a synonym to: ``` luarocks --only-from=/foo/bar build luasocket ``` (This is consistent with the GNU getopt handling of "--" long options.) Closes #65. --- test/testing.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/testing.sh b/test/testing.sh index becaa14f..1c411a98 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -319,10 +319,14 @@ need_luasocket() { need luasocket $verrev_luasocket; } test_version() { $luarocks --version; } -fail_arg_server() { $luarocks --server; } -fail_arg_only_server() { $luarocks --only-server; } fail_unknown_command() { $luarocks unknown_command; } +fail_arg_boolean_parameter() { $luarocks --porcelain=invalid; } +fail_arg_boolean_unknown() { $luarocks --invalid-flag; } +fail_arg_string_no_parameter() { $luarocks --server; } +fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } +fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } + test_empty_list() { $luarocks list; } fail_bad_sysconfig() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } -- cgit v1.2.3-55-g6feb