aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-23 23:25:25 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-23 23:25:25 -0300
commit7f7c006007c42376d711d71f42e5577d431c6b64 (patch)
treee42419133bdccfc47760783402b5781e35b55882 /test
parent68aa7aef29000099ab1dfebe92052e693fe18d64 (diff)
downloadluarocks-7f7c006007c42376d711d71f42e5577d431c6b64.tar.gz
luarocks-7f7c006007c42376d711d71f42e5577d431c6b64.tar.bz2
luarocks-7f7c006007c42376d711d71f42e5577d431c6b64.zip
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.
Diffstat (limited to '')
-rwxr-xr-xtest/testing.sh8
1 files changed, 6 insertions, 2 deletions
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; }
319 319
320test_version() { $luarocks --version; } 320test_version() { $luarocks --version; }
321 321
322fail_arg_server() { $luarocks --server; }
323fail_arg_only_server() { $luarocks --only-server; }
324fail_unknown_command() { $luarocks unknown_command; } 322fail_unknown_command() { $luarocks unknown_command; }
325 323
324fail_arg_boolean_parameter() { $luarocks --porcelain=invalid; }
325fail_arg_boolean_unknown() { $luarocks --invalid-flag; }
326fail_arg_string_no_parameter() { $luarocks --server; }
327fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; }
328fail_arg_string_unknown() { $luarocks --invalid-flag=abc; }
329
326test_empty_list() { $luarocks list; } 330test_empty_list() { $luarocks list; }
327 331
328fail_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"; } 332fail_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"; }