-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from raboof/fix-invalid-.git-capture
Fix invalid .git capture
- Loading branch information
Showing
3 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.typesafe.sbt | ||
|
||
import sbt.ScmInfo | ||
import sbt.url | ||
|
||
class SbtGitSuite extends munit.FunSuite { | ||
val expectedScmInfo = Some(ScmInfo( | ||
browseUrl = url("https://github.com/akka/akka"), | ||
connection = "scm:git:https://github.com/akka/akka.git", | ||
devConnection = Some("scm:git:git@github.com:akka/akka.git") | ||
)) | ||
|
||
test("a git URL with the .git postfix") { | ||
assertEquals(SbtGit.parseScmInfo("git@github.com:akka/akka.git"), expectedScmInfo) | ||
} | ||
test("a git URL without the .git postfix") { | ||
assertEquals(SbtGit.parseScmInfo("git@github.com:akka/akka"), expectedScmInfo) | ||
} | ||
test("a https URL with the .git postfix") { | ||
assertEquals(SbtGit.parseScmInfo("https://github.com/akka/akka.git"), expectedScmInfo) | ||
} | ||
test("a https URL without the .git postfix") { | ||
assertEquals(SbtGit.parseScmInfo("https://github.com/akka/akka"), expectedScmInfo) | ||
} | ||
} |