@@ -13,6 +13,8 @@ namespace Svn2GitNet.Tests
13
13
public class End2EndTest
14
14
{
15
15
private const string PUBLIC_CLASSIC_LAYOUT_REPOSITORY_URL = "https://svn.code.sf.net/p/svn2gitnetclassicstructure/code" ;
16
+ private const string PUBLIC_NON_STANDARD_LAYOUT_REPOSITORY_URL = "https://svn.code.sf.net/p/svn2gitnetnonstandard/code" ;
17
+ private const string PUBLIC_NON_STANDARD_LAYOUT_NO_BRANCH_NO_TAG_REPOSITORY_URL = "https://svn.code.sf.net/p/svn2gitnetnonstandardsole/code" ;
16
18
17
19
[ Fact ]
18
20
public void PrivateRepositoryEnd2EndTest ( )
@@ -50,7 +52,7 @@ public void PublicClassicLayoutRepositoryEnd2EndBranchTest()
50
52
{
51
53
string subWorkingFolder = "PublicRepoBranchTest" ;
52
54
string expectedBranchInfo = " dev dev@1* master" ;
53
- int exitCode = RunCommand ( BuildSvn2GitNetProcessStartInfo ( $ "{ PUBLIC_CLASSIC_LAYOUT_REPOSITORY_URL } -v", "PublicRepoBranchTest" ) ) ;
55
+ int exitCode = RunCommand ( BuildSvn2GitNetProcessStartInfo ( $ "{ PUBLIC_CLASSIC_LAYOUT_REPOSITORY_URL } -v", subWorkingFolder ) ) ;
54
56
55
57
Assert . Equal ( 0 , exitCode ) ;
56
58
@@ -83,6 +85,71 @@ public void PublicClassicLayoutRepositoryEnd2EndTagTest()
83
85
Assert . Equal ( expectedTagInfo , actualTagInfo ) ;
84
86
}
85
87
88
+ [ Fact ]
89
+ public void PublicNonstandardLayoutRepositoryEnd2EndSmokeTest ( )
90
+ {
91
+ int exitCode = RunCommand ( BuildSvn2GitNetProcessStartInfo ( $ "{ PUBLIC_NON_STANDARD_LAYOUT_REPOSITORY_URL } --rootistrunk -v", "PublicNonStandardRepoSmokeTest" ) ) ;
92
+
93
+ Assert . Equal ( 0 , exitCode ) ;
94
+ }
95
+
96
+ [ Fact ]
97
+ public void PublicNonstandardLayoutRepositoryEnd2EndNoBranchNoTagTest ( )
98
+ {
99
+ string subWorkingFolder = "PublicNonStandardRepoNoBranchNoTagTest" ;
100
+ string expectedBranchInfo = "* master" ;
101
+ int exitCode = RunCommand ( BuildSvn2GitNetProcessStartInfo ( $ "{ PUBLIC_NON_STANDARD_LAYOUT_NO_BRANCH_NO_TAG_REPOSITORY_URL } --rootistrunk -v", subWorkingFolder ) ) ;
102
+
103
+ Assert . Equal ( 0 , exitCode ) ;
104
+
105
+ ICommandRunner commandRunner = new CommandRunner ( ) ;
106
+
107
+ string actualBranchInfo = string . Empty ;
108
+ string dummyError = string . Empty ;
109
+ commandRunner . Run ( "git" , "branch" , out actualBranchInfo , out dummyError , Path . Combine ( GetIntegrationTestsTempFolderPath ( ) , subWorkingFolder ) ) ;
110
+
111
+ Assert . Equal ( 0 , exitCode ) ;
112
+ Assert . Equal ( expectedBranchInfo , actualBranchInfo ) ;
113
+ }
114
+
115
+ [ Fact ]
116
+ public void PublicNonstandardLayoutRepositoryEnd2EndBranchTest ( )
117
+ {
118
+ string subWorkingFolder = "PublicNonStandardRepoBranchTest" ;
119
+ string expectedBranchInfo = " 1.0.0 1.0.0@1 1.0.0@3 br1 br1@17 br1@3* master" ;
120
+ int exitCode = RunCommand ( BuildSvn2GitNetProcessStartInfo ( $ "{ PUBLIC_NON_STANDARD_LAYOUT_REPOSITORY_URL } --trunk main --branches dev --tags rel -v", subWorkingFolder ) ) ;
121
+
122
+ Assert . Equal ( 0 , exitCode ) ;
123
+
124
+ ICommandRunner commandRunner = new CommandRunner ( ) ;
125
+
126
+ string actualBranchInfo = string . Empty ;
127
+ string dummyError = string . Empty ;
128
+ commandRunner . Run ( "git" , "branch" , out actualBranchInfo , out dummyError , Path . Combine ( GetIntegrationTestsTempFolderPath ( ) , subWorkingFolder ) ) ;
129
+
130
+ Assert . Equal ( 0 , exitCode ) ;
131
+ Assert . Equal ( expectedBranchInfo , actualBranchInfo ) ;
132
+ }
133
+
134
+ [ Fact ]
135
+ public void PublicNonstandardLayoutRepositoryEnd2EndTagTest ( )
136
+ {
137
+ string subWorkingFolder = "PublicNonStandardRepoTagTest" ;
138
+ string expectedBranchInfo = "1.0.01.0.0@3" ;
139
+ int exitCode = RunCommand ( BuildSvn2GitNetProcessStartInfo ( $ "{ PUBLIC_NON_STANDARD_LAYOUT_REPOSITORY_URL } --trunk main --branches dev --tags rel -v", subWorkingFolder ) ) ;
140
+
141
+ Assert . Equal ( 0 , exitCode ) ;
142
+
143
+ ICommandRunner commandRunner = new CommandRunner ( ) ;
144
+
145
+ string actualBranchInfo = string . Empty ;
146
+ string dummyError = string . Empty ;
147
+ commandRunner . Run ( "git" , "tag" , out actualBranchInfo , out dummyError , Path . Combine ( GetIntegrationTestsTempFolderPath ( ) , subWorkingFolder ) ) ;
148
+
149
+ Assert . Equal ( 0 , exitCode ) ;
150
+ Assert . Equal ( expectedBranchInfo , actualBranchInfo ) ;
151
+ }
152
+
86
153
private ProcessStartInfo BuildSvn2GitNetProcessStartInfo ( string arguments , string subWorkingFolder = "" )
87
154
{
88
155
string platformSepcifier = GetPlatformSpecifier ( ) ;
0 commit comments