File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 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)
169169 printf (" Git version: %s\n " , VER);
170170 return 0 ;
171171 }
172- if (args->contains (QLatin1String (" help" )) || args-> arguments (). count () != 1 ) {
172+ if (args->contains (QLatin1String (" help" ))) {
173173 args->usage (QString (), " [Path to subversion repo]" );
174174 return 0 ;
175175 }
176+ if (args->arguments ().count () != 1 ) {
177+ args->usage (QString (), " [Path to subversion repo]" );
178+ return 12 ;
179+ }
176180 if (args->undefinedOptions ().count ()) {
177181 QTextStream out (stderr);
178182 out << " svn-all-fast-export failed: " ;
Original file line number Diff line number Diff line change @@ -55,3 +55,15 @@ setup() {
5555 assert_success
5656 assert_output --partial ' Usage:'
5757}
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