diff options
| author | ruki <[email protected]> | 2019-06-06 21:10:20 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-06 21:10:20 +0800 |
| commit | 991e0e0a44cdebb2774dadb555ea0e561763bf99 (patch) | |
| tree | 4fabcb48cf0bbe337941f878b1b2e7c1e31ca379 /tests/modules | |
| parent | 8b63c754cb4cce918aec1c06225ceb3735388140 (diff) | |
| parent | b4c94415e8c7ee24cb3f8c0ba6e0536282121adf (diff) | |
Merge pull request #438 from OpportunityLiu/new-win-install
Support update script
Diffstat (limited to 'tests/modules')
| -rw-r--r-- | tests/modules/devel/git/test.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/modules/devel/git/test.lua b/tests/modules/devel/git/test.lua new file mode 100644 index 000000000..ddcfc94b2 --- /dev/null +++ b/tests/modules/devel/git/test.lua @@ -0,0 +1,21 @@ +import("devel.git") + + +function test_asgiturl() + assert(git.asgiturl("http://github.com/a/b") == "https://github.com/a/b.git") + assert(git.asgiturl("http://github.com/a/b/") == "https://github.com/a/b.git") + assert(git.asgiturl("HTTP://github.com//a/b/") == "https://github.com/a/b.git") + assert(git.asgiturl("http://github.com//a/b/s") == nil) + assert(git.asgiturl("https://github.com/a/b") == "https://github.com/a/b.git") + assert(git.asgiturl("https://github.com/a/b.git") == "https://github.com/a/b.git") + assert(git.asgiturl("HTTPS://GITHUB.com/a/b.git.git") == "https://github.com/a/b.git.git") + + assert(git.asgiturl("github:a/b") == "https://github.com/a/b.git") + assert(git.asgiturl("github:a/b.git") == "https://github.com/a/b.git.git") + assert(git.asgiturl("GitHub://a/b/") == "https://github.com/a/b.git") + assert(git.asgiturl("github:a/b/c") == nil) +end + +function main() + test_asgiturl() +end
\ No newline at end of file |
