diff options
Diffstat (limited to 'test/testing.lua')
-rw-r--r-- | test/testing.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/testing.lua b/test/testing.lua index 50911fd4..63dead2b 100644 --- a/test/testing.lua +++ b/test/testing.lua | |||
@@ -441,5 +441,17 @@ local tests = { | |||
441 | return run "$luarocks install luarepl" | 441 | return run "$luarocks install luarepl" |
442 | and run "$luarocks doc luarepl" | 442 | and run "$luarocks doc luarepl" |
443 | end, | 443 | end, |
444 | |||
445 | -- Tests for https://github.com/keplerproject/luarocks/issues/375 | ||
446 | test_fetch_base_dir = function() | ||
447 | local fetch = require "luarocks.fetch" | ||
448 | |||
449 | return assert("v0.3" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2/archive/v0.3.zip")) | ||
450 | and assert("lua-compat-5.2" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.zip")) | ||
451 | and assert("lua-compat-5.2" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.tar.gz")) | ||
452 | and assert("lua-compat-5.2" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.tar.bz2")) | ||
453 | and assert("parser.moon" == fetch.url_to_base_dir("git://github.com/Cirru/parser.moon")) | ||
454 | and assert("v0.3" == fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2/archive/v0.3")) | ||
455 | end | ||
444 | 456 | ||
445 | } | 457 | } |