File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,14 @@ int main(int argc, char **argv)
169
169
printf (" Git version: %s\n " , VER);
170
170
return 0 ;
171
171
}
172
- if (args->contains (QLatin1String (" help" )) || args-> arguments (). count () != 1 ) {
172
+ if (args->contains (QLatin1String (" help" ))) {
173
173
args->usage (QString (), " [Path to subversion repo]" );
174
174
return 0 ;
175
175
}
176
+ if (args->arguments ().count () != 1 ) {
177
+ args->usage (QString (), " [Path to subversion repo]" );
178
+ return 12 ;
179
+ }
176
180
if (args->undefinedOptions ().count ()) {
177
181
QTextStream out (stderr);
178
182
out << " svn-all-fast-export failed: " ;
Original file line number Diff line number Diff line change @@ -55,3 +55,15 @@ setup() {
55
55
assert_success
56
56
assert_output --partial ' Usage:'
57
57
}
58
+
59
+ @test ' not giving a repository should exist with non-zero exit code and print usage' {
60
+ run svn2git
61
+ assert_failure 12
62
+ assert_output --partial ' Usage:'
63
+ }
64
+
65
+ @test ' giving mutliple repositories should exist with non-zero exit code and print usage' {
66
+ run svn2git repo-a repo-b
67
+ assert_failure 12
68
+ assert_output --partial ' Usage:'
69
+ }
You can’t perform that action at this time.
0 commit comments