From 303628aedfba818727ae3044d117e0cb097e02e1 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 26 Mar 2015 03:12:56 -0300 Subject: Add more simple tests. --- test/testing.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') 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 ssh-keyscan localhost >> ~/.ssh/known_hosts else luadir="/Programs/Lua/Current" + if [ ! -e "$luadir" ] + then + luadir="/usr/local" + fi fi if [ `uname -m` = i686 ] @@ -389,6 +393,7 @@ test_help() { $luarocks help; } fail_help_invalid() { $luarocks help invalid; } test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } +test_install_only_server() { $luarocks install --only-server "$testing_cache" luasocket; } test_install_with_bin() { $luarocks install wsapi; } fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } fail_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"; } fail_install_invalid_arch() { $luarocks install "foo-1.0-1.impossible-x86.rock"; } test_install_reinstall() { $luarocks install "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; $luarocks install --deps-mode=none "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; } +fail_local_root() { USER=root $luarocks install --local luasocket; } + +test_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; } + test_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; } fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } -- cgit v1.2.3-55-g6feb