aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-26 03:12:56 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-26 03:12:56 -0300
commit303628aedfba818727ae3044d117e0cb097e02e1 (patch)
tree29075b6f9e34e0b7610e4b1598ddfea0df13da14 /test
parent8d6a9e333d7d62c870b25e5402de5555245cf73e (diff)
downloadluarocks-303628aedfba818727ae3044d117e0cb097e02e1.tar.gz
luarocks-303628aedfba818727ae3044d117e0cb097e02e1.tar.bz2
luarocks-303628aedfba818727ae3044d117e0cb097e02e1.zip
Add more simple tests.
Diffstat (limited to 'test')
-rwxr-xr-xtest/testing.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/testing.sh b/test/testing.sh
index c36cb013..8e3a72b3 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -160,6 +160,10 @@ then
160 ssh-keyscan localhost >> ~/.ssh/known_hosts 160 ssh-keyscan localhost >> ~/.ssh/known_hosts
161else 161else
162 luadir="/Programs/Lua/Current" 162 luadir="/Programs/Lua/Current"
163 if [ ! -e "$luadir" ]
164 then
165 luadir="/usr/local"
166 fi
163fi 167fi
164 168
165if [ `uname -m` = i686 ] 169if [ `uname -m` = i686 ]
@@ -389,6 +393,7 @@ test_help() { $luarocks help; }
389fail_help_invalid() { $luarocks help invalid; } 393fail_help_invalid() { $luarocks help invalid; }
390 394
391test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } 395test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; }
396test_install_only_server() { $luarocks install --only-server "$testing_cache" luasocket; }
392test_install_with_bin() { $luarocks install wsapi; } 397test_install_with_bin() { $luarocks install wsapi; }
393fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } 398fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; }
394fail_install_invalidpatch() { need_luasocket; $luarocks install "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } 399fail_install_invalidpatch() { need_luasocket; $luarocks install "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; }
@@ -396,6 +401,10 @@ fail_install_invalid_filename() { $luarocks install "invalid.rock"; }
396fail_install_invalid_arch() { $luarocks install "foo-1.0-1.impossible-x86.rock"; } 401fail_install_invalid_arch() { $luarocks install "foo-1.0-1.impossible-x86.rock"; }
397test_install_reinstall() { $luarocks install "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; $luarocks install --deps-mode=none "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; } 402test_install_reinstall() { $luarocks install "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; $luarocks install --deps-mode=none "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; }
398 403
404fail_local_root() { USER=root $luarocks install --local luasocket; }
405
406test_site_config() { mv ../src/luarocks/site_config.lua ../src/luarocks/site_config.lua.tmp; $luarocks; mv ../src/luarocks/site_config.lua.tmp ../src/luarocks/site_config.lua; }
407
399test_lint_ok() { $luarocks download --rockspec validate-args ${verrev_validate_args} && $luarocks lint ./validate-args-${verrev_validate_args}.rockspec && rm ./validate-args-${verrev_validate_args}.rockspec; } 408test_lint_ok() { $luarocks download --rockspec validate-args ${verrev_validate_args} && $luarocks lint ./validate-args-${verrev_validate_args}.rockspec && rm ./validate-args-${verrev_validate_args}.rockspec; }
400fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } 409fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; }
401fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } 410fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; }