aboutsummaryrefslogtreecommitdiff
path: root/test/testing.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/testing.sh')
-rwxr-xr-xtest/testing.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/testing.sh b/test/testing.sh
index 133597ee..6219a38f 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -511,6 +511,19 @@ fail_config_user_config() { LUAROCKS_CONFIG="/missing_file.lua" $luarocks config
511test_config_rock_trees() { $luarocks config --rock-trees; } 511test_config_rock_trees() { $luarocks config --rock-trees; }
512test_config_help() { $luarocks help config; } 512test_config_help() { $luarocks help config; }
513 513
514# Tests for https://github.com/keplerproject/luarocks/issues/375
515test_fetch_base_dir() { $lua <<EOF
516 local fetch = require "luarocks.fetch"
517
518 assert("v0.3" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2/archive/v0.3.zip"))
519 assert("lua-compat-5.2" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.zip"))
520 assert("lua-compat-5.2" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.tar.gz"))
521 assert("lua-compat-5.2" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.tar.bz2"))
522 assert("parser.moon" == fetch.url_to_base_dir("git://github.com/Cirru/parser.moon"))
523 assert("v0.3" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2/archive/v0.3"))
524EOF
525}
526
514test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } 527test_doc() { $luarocks install luarepl; $luarocks doc luarepl; }
515 528
516# Driver ######################################### 529# Driver #########################################