diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-18 18:03:17 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-18 18:03:17 -0300 |
commit | 15cc0d67cc5aefdca7d07242c800b69c6b57ac3a (patch) | |
tree | 887e3cec30f4e4a21086e46b16c74dd13a562846 | |
parent | 30c2877d2f3162978a63f8c0f704eb1c3545d6d2 (diff) | |
download | luarocks-15cc0d67cc5aefdca7d07242c800b69c6b57ac3a.tar.gz luarocks-15cc0d67cc5aefdca7d07242c800b69c6b57ac3a.tar.bz2 luarocks-15cc0d67cc5aefdca7d07242c800b69c6b57ac3a.zip |
Improve coverage -- now at 79.65%
-rwxr-xr-x | test/testing.sh | 8 |
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 | |||
187 | test_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}; } | 187 | test_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 | ||
189 | test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } | 189 | test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } |
190 | test_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 | ||
191 | test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } | 192 | test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } |
192 | test_pack_src() { $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } | 193 | test_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; } | |||
221 | fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; } | 222 | fail_admin_invalidserver() { $luarocks_admin --server=invalid add ./luasocket-${verrev_luasocket}.src.rock; } |
222 | fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } | 223 | fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } |
223 | test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } | 224 | test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } |
224 | test_admin_remove() { $luarocks_admin --server=testing remove luasocket; } | 225 | test_admin_remove() { $luarocks_admin --server=testing remove ./luasocket-${verrev_luasocket}.src.rock; } |
225 | fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } | 226 | fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } |
226 | 227 | ||
227 | fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } | 228 | fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } |
@@ -234,6 +235,11 @@ test_deps_mode_nodeps_alias() { $luarocks build --tree="$testing_tree" --nodeps | |||
234 | test_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}; } | 235 | test_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}; } |
235 | test_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 | test_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 | ||
238 | test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } | ||
239 | test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } | ||
240 | test_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"; } | ||
241 | fail_write_rockspec_args() { $luarocks write_rockspec invalid; } | ||
242 | |||
237 | # Driver ######################################### | 243 | # Driver ######################################### |
238 | 244 | ||
239 | run_tests() { | 245 | run_tests() { |