Skip to content

Commit 2d36c6a

Browse files
committed
Couple more tests
1 parent f9025b2 commit 2d36c6a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/parser.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ mod tests {
335335
#[case("GIT://GitHub.COM/jwodder/headerparser", Some(("jwodder", "headerparser")))]
336336
#[case("git@github.com:joe-q-coder/my.repo.git", Some(("joe-q-coder", "my.repo")))]
337337
#[case("git@GITHUB.com:joe-q-coder/my.repo.git", Some(("joe-q-coder", "my.repo")))]
338+
#[case("git@GITHUB.com:joe-q-coder/my.repo.GIT", None)]
338339
#[case("GIT@github.com:joe-q-coder/my.repo.git", None)]
339340
#[case("git@github.com/joe-q-coder/my.repo.git", None)]
340341
#[case("https://github.com/joe.coder/hello-world", None)]
@@ -354,6 +355,7 @@ mod tests {
354355
#[case("api.github.com/REPOS/jwodder/headerparser", None)]
355356
#[case("Api.GitHub.Com/repos/jwodder/headerparser", Some(("jwodder", "headerparser")))]
356357
#[case("https://github.com/-Jerry-/geshi-1.0.git", Some(("-Jerry-", "geshi-1.0")))]
358+
#[case("https://github.com/-Jerry-/geshi-1.0.Git", None)]
357359
#[case("https://github.com/-Jerry-/geshi-1.0.git/", Some(("-Jerry-", "geshi-1.0")))]
358360
#[case("https://github.com/-Jerry-/geshi-1.0/", Some(("-Jerry-", "geshi-1.0")))]
359361
#[case("https://www.github.com/-Jerry-/geshi-1.0", Some(("-Jerry-", "geshi-1.0")))]

tests/ghrepo.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ fn repo_urls(#[case] url: &str, #[case] owner: &str, #[case] name: &str) {}
287287
#[case("https://x-access-token:1234567890@api.github.com/repos/octocat/Hello-World")]
288288
#[case("x-access-token:1234567890@github.com/octocat/Hello-World")]
289289
#[case("git@github.com/jwodder/headerparser")]
290+
#[case("git@GITHUB.com:joe-q-coder/my.repo.GIT")]
290291
#[case("GIT@github.com:joe-q-coder/my.repo.git")]
291292
#[case("git@github.com/joe-q-coder/my.repo.git")]
292293
#[case("ssh://git@github.com:jwodder/headerparser")]
@@ -296,6 +297,7 @@ fn repo_urls(#[case] url: &str, #[case] owner: &str, #[case] name: &str) {}
296297
#[case("SSH://Git@GITHUB.COM/-/test")]
297298
#[case("ssh://GIT@github.com/-/test")]
298299
#[case("https://http://github.com/joe-coder/hello.world")]
300+
#[case("https://github.com/-Jerry-/geshi-1.0.Git")]
299301
fn bad_repos(#[case] url: &str) {}
300302

301303
#[apply(repo_urls)]

0 commit comments

Comments
 (0)