diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-23 23:25:25 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-23 23:25:25 -0300 |
commit | 7f7c006007c42376d711d71f42e5577d431c6b64 (patch) | |
tree | e42419133bdccfc47760783402b5781e35b55882 /test | |
parent | 68aa7aef29000099ab1dfebe92052e693fe18d64 (diff) | |
download | luarocks-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-x | test/testing.sh | 8 |
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 | ||
320 | test_version() { $luarocks --version; } | 320 | test_version() { $luarocks --version; } |
321 | 321 | ||
322 | fail_arg_server() { $luarocks --server; } | ||
323 | fail_arg_only_server() { $luarocks --only-server; } | ||
324 | fail_unknown_command() { $luarocks unknown_command; } | 322 | fail_unknown_command() { $luarocks unknown_command; } |
325 | 323 | ||
324 | fail_arg_boolean_parameter() { $luarocks --porcelain=invalid; } | ||
325 | fail_arg_boolean_unknown() { $luarocks --invalid-flag; } | ||
326 | fail_arg_string_no_parameter() { $luarocks --server; } | ||
327 | fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } | ||
328 | fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } | ||
329 | |||
326 | test_empty_list() { $luarocks list; } | 330 | test_empty_list() { $luarocks list; } |
327 | 331 | ||
328 | 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"; } | 332 | 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"; } |