diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2015-07-01 15:13:49 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-07-01 15:13:49 -0300 |
| commit | 634ff0af63a250859863cee25b8ab21e2404a267 (patch) | |
| tree | 193bb89d9ae4921be8c0825d969d93113843bbb8 /test/testing.lua | |
| parent | d00c4e9cd7d0e8209b959710434f8448b4f95915 (diff) | |
| parent | c6e3556c0a883831dde10858b32ce21cacd1bd0e (diff) | |
| download | luarocks-634ff0af63a250859863cee25b8ab21e2404a267.tar.gz luarocks-634ff0af63a250859863cee25b8ab21e2404a267.tar.bz2 luarocks-634ff0af63a250859863cee25b8ab21e2404a267.zip | |
Merge pull request #404 from ignacio/url_to_base_dir
Strip only known extensions
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 | } |
