diff --git a/behave/features/rdiff.feature b/behave/features/rdiff.feature new file mode 100644 index 00000000..29a55857 --- /dev/null +++ b/behave/features/rdiff.feature @@ -0,0 +1,26 @@ +Feature: `osc rdiff` command + + +# common steps for all scenarios +Background: + Given I set working directory to "{context.osc.temp}" + + +Scenario: Run `osc rdiff / /` + When I execute osc with args "rdiff test:factory/test-pkgA test:factory/test-pkgA" + Then the exit code is 0 + + +Scenario: Run `osc rdiff / ` + When I execute osc with args "rdiff test:factory/test-pkgA test:factory" + Then the exit code is 0 + + +Scenario: Run `osc rdiff /` + When I execute osc with args "rdiff test:factory/test-pkgA" + Then the exit code is 0 + + +Scenario: Run `osc rdiff / --change` + When I execute osc with args "rdiff test:factory/test-pkgA --change=1" + Then the exit code is 0 diff --git a/osc/commandline.py b/osc/commandline.py index a57adcb2..29f1e017 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4200,6 +4200,9 @@ Please submit there instead, or use --nodevelproject to force direct submission. ) ensure_no_remaining_args(args) + if not new_project: + new_project = old_project + if not new_package: new_package = old_package