diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-26 03:12:56 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-26 03:12:56 -0300 |
| commit | 303628aedfba818727ae3044d117e0cb097e02e1 (patch) | |
| tree | 29075b6f9e34e0b7610e4b1598ddfea0df13da14 /test | |
| parent | 8d6a9e333d7d62c870b25e5402de5555245cf73e (diff) | |
| download | luarocks-303628aedfba818727ae3044d117e0cb097e02e1.tar.gz luarocks-303628aedfba818727ae3044d117e0cb097e02e1.tar.bz2 luarocks-303628aedfba818727ae3044d117e0cb097e02e1.zip | |
Add more simple tests.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/testing.sh | 9 |
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 |
| 161 | else | 161 | else |
| 162 | luadir="/Programs/Lua/Current" | 162 | luadir="/Programs/Lua/Current" |
| 163 | if [ ! -e "$luadir" ] | ||
| 164 | then | ||
| 165 | luadir="/usr/local" | ||
| 166 | fi | ||
| 163 | fi | 167 | fi |
| 164 | 168 | ||
| 165 | if [ `uname -m` = i686 ] | 169 | if [ `uname -m` = i686 ] |
| @@ -389,6 +393,7 @@ test_help() { $luarocks help; } | |||
| 389 | fail_help_invalid() { $luarocks help invalid; } | 393 | fail_help_invalid() { $luarocks help invalid; } |
| 390 | 394 | ||
| 391 | test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } | 395 | test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } |
| 396 | test_install_only_server() { $luarocks install --only-server "$testing_cache" luasocket; } | ||
| 392 | test_install_with_bin() { $luarocks install wsapi; } | 397 | test_install_with_bin() { $luarocks install wsapi; } |
| 393 | fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } | 398 | fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } |
| 394 | fail_install_invalidpatch() { need_luasocket; $luarocks install "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } | 399 | 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"; } | |||
| 396 | fail_install_invalid_arch() { $luarocks install "foo-1.0-1.impossible-x86.rock"; } | 401 | fail_install_invalid_arch() { $luarocks install "foo-1.0-1.impossible-x86.rock"; } |
| 397 | test_install_reinstall() { $luarocks install "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; $luarocks install --deps-mode=none "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; } | 402 | test_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 | ||
| 404 | fail_local_root() { USER=root $luarocks install --local luasocket; } | ||
| 405 | |||
| 406 | 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; } | ||
| 407 | |||
| 399 | 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; } | 408 | 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; } |
| 400 | fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } | 409 | fail_lint_type_mismatch_string() { $luarocks lint "$testing_dir/testfiles/type_mismatch_string-1.0-1.rockspec"; } |
| 401 | fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } | 410 | fail_lint_type_mismatch_version() { $luarocks lint "$testing_dir/testfiles/type_mismatch_version-1.0-1.rockspec"; } |
