Skip to content

Commit 04ed38e

Browse files
Kieran MarronKieran Marron
Kieran Marron
authored and
Kieran Marron
committed
Additonal tests to check ip addresses are ignored
1 parent a6b4667 commit 04ed38e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/GitVersionCore.Tests/MergeMessageTests.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ public void EmptyTagPrefix(string prefix)
5959
new object[] { "Merge tag 'v4.0.0' into master", "v4.0.0", "master", new SemanticVersion(4) },
6060
new object[] { "Merge tag 'V4.0.0' into master", "V4.0.0", "master", new SemanticVersion(4) },
6161
new object[] { "Merge branch 'feature/4.1/one'", "feature/4.1/one", null, new SemanticVersion(4, 1) },
62-
new object[] { "Merge branch 'origin/4.1/feature/one'", "origin/4.1/feature/one", null, new SemanticVersion(4, 1) }
62+
new object[] { "Merge branch 'origin/4.1/feature/one'", "origin/4.1/feature/one", null, new SemanticVersion(4, 1) },
63+
new object[] { "Merge tag 'v://10.10.10.10' into master", "v://10.10.10.10", "master", null }
64+
6365
};
6466

6567
[TestCaseSource(nameof(MergeMessages))]
@@ -88,6 +90,7 @@ public void ParsesMergeMessage(
8890
new object[] { "Merge pull request #1234 in V4.0.0", "V4.0.0", null, new SemanticVersion(4), 1234 },
8991
new object[] { "Merge pull request #1234 from origin/feature/one", "origin/feature/one", null, null, 1234 },
9092
new object[] { "Merge pull request #1234 in feature/4.1/one", "feature/4.1/one", null, new SemanticVersion(4,1), 1234 },
93+
new object[] { "Merge pull request #1234 in V://10.10.10.10", "V://10.10.10.10", null, null, 1234 },
9194

9295

9396
//TODO: Investigate successful github merge messages that may be invalid
@@ -125,7 +128,7 @@ public void ParsesGitHubPullMergeMessage(
125128
new object[] { "Merge pull request #1234 from origin/feature/one from origin/feature/4.2/two to dev", "origin/feature/4.2/two", null, new SemanticVersion(4,2), 1234 },
126129
new object[] { "Merge pull request #1234 in feature/4.1/one from feature/4.2/two to dev", "feature/4.2/two", null, new SemanticVersion(4,2), 1234 },
127130
new object[] { "Merge pull request #1234 in feature/4.1/one from feature/4.2/two to dev into master", "feature/4.2/two", "master", new SemanticVersion(4,2), 1234 },
128-
131+
new object[] { "Merge pull request #1234 in V4.1.0 from V://10.10.10.10 to dev", "V://10.10.10.10", null, null, 1234 },
129132
//TODO: Investigate successful bitbucket merge messages that may be invalid
130133
// Regex has double 'from/in from' section. Is that correct?
131134
new object[] { "Merge pull request #1234 in feature/4.1/one from feature/4.2/two to dev", "feature/4.2/two", null, new SemanticVersion(4,2), 1234 },
@@ -162,6 +165,7 @@ public void ParsesBitBucketPullMergeMessage(
162165
new object[] { "Finish v4.0.0", "v4.0.0", null, new SemanticVersion(4) },
163166
new object[] { "Finish feature/4.1/one", "feature/4.1/one", null, new SemanticVersion(4, 1) },
164167
new object[] { "Finish origin/4.1/feature/one", "origin/4.1/feature/one", null, new SemanticVersion(4, 1) },
168+
new object[] { "Finish V://10.10.10.10", "V://10.10.10.10", null, null },
165169

166170
//TODO: Investigate successful smart git merge messages that may be invalid
167171
// The branch name appears to be incorrect
@@ -193,7 +197,8 @@ public void ParsesSmartGitMergeMessage(
193197
new object[] { "Merge remote-tracking branch 'v4.0.0' into master", "v4.0.0", "master", new SemanticVersion(4) },
194198
new object[] { "Merge remote-tracking branch 'V4.0.0' into master", "V4.0.0", "master", new SemanticVersion(4) },
195199
new object[] { "Merge remote-tracking branch 'feature/4.1/one' into dev", "feature/4.1/one", "dev", new SemanticVersion(4, 1) },
196-
new object[] { "Merge remote-tracking branch 'origin/4.1/feature/one' into master", "origin/4.1/feature/one", "master", new SemanticVersion(4, 1) }
200+
new object[] { "Merge remote-tracking branch 'origin/4.1/feature/one' into master", "origin/4.1/feature/one", "master", new SemanticVersion(4, 1) },
201+
new object[] { "Merge remote-tracking branch 'v://10.10.10.10' into master", "v://10.10.10.10", "master", null }
197202
};
198203

199204
[TestCaseSource(nameof(RemoteTrackingMergeMessages))]

0 commit comments

Comments
 (0)