aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-10-18 18:03:17 -0300
committerHisham Muhammad <hisham@gobolinux.org>2013-10-18 18:03:17 -0300
commit15cc0d67cc5aefdca7d07242c800b69c6b57ac3a (patch)
tree887e3cec30f4e4a21086e46b16c74dd13a562846
parent30c2877d2f3162978a63f8c0f704eb1c3545d6d2 (diff)
downloadluarocks-15cc0d67cc5aefdca7d07242c800b69c6b57ac3a.tar.gz
luarocks-15cc0d67cc5aefdca7d07242c800b69c6b57ac3a.tar.bz2
luarocks-15cc0d67cc5aefdca7d07242c800b69c6b57ac3a.zip
Improve coverage -- now at 79.65%
-rwxr-xr-xtest/testing.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/testing.sh b/test/testing.sh
index 5b3de201..5eb35e56 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -187,6 +187,7 @@ test_make() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --src
187test_make_pack_binary_rock() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --deps-mode=none --pack-binary-rock && [ -e ./lxsh-${verrev_lxsh}.all.rock ] && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } 187test_make_pack_binary_rock() { rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --deps-mode=none --pack-binary-rock && [ -e ./lxsh-${verrev_lxsh}.all.rock ] && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; }
188 188
189test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } 189test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; }
190test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; }
190 191
191test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } 192test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; }
192test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } 193test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; }
@@ -221,7 +222,7 @@ fail_admin_add_missing() { $luarocks_admin --server=testing add; }
221fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; } 222fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; }
222fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } 223fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; }
223test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } 224test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; }
224test_admin_remove() { $luarocks_admin --server=testing remove luasocket; } 225test_admin_remove() { $luarocks_admin --server=testing remove ./luasocket-${verrev_luasocket}.src.rock; }
225fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } 226fail_admin_remove_missing() { $luarocks_admin --server=testing remove; }
226 227
227fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } 228fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; }
@@ -234,6 +235,11 @@ test_deps_mode_nodeps_alias() { $luarocks build --tree="$testing_tree" --nodeps
234test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --tree="$testing_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ] && rm -rf ./lxsh-${verrev_lxsh}; } 235test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --tree="$testing_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 0 ] && rm -rf ./lxsh-${verrev_lxsh}; }
235test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --tree="$testing_sys_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; } 236test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --src lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --tree="$testing_sys_tree" --deps-mode=order && cd ../.. && [ `$luarocks list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; }
236 237
238test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; }
239test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; }
240test_write_rockspec_fullargs() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --lua-version=5.1,5.2 --license="MIT/X11" --homepage="http://www.luarocks.org" --summary="A package manager for Lua modules"; }
241fail_write_rockspec_args() { $luarocks write_rockspec invalid; }
242
237# Driver ######################################### 243# Driver #########################################
238 244
239run_tests() { 245run_tests() {