mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-07 21:58:41 +02:00
Fix 'mv' command when renaming a file multiple times
This commit is contained in:
@@ -19,3 +19,36 @@ Scenario: Run `osc mv <file> <new-name>` in a package checkout
|
||||
"""
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" does not exist
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/new-name.changes" exists
|
||||
|
||||
|
||||
Scenario: Run `osc mv <file> <new-name>` several times
|
||||
When I execute osc with args "mv test-pkgA.changes test-pkgA.changes-1"
|
||||
Then the exit code is 0
|
||||
And I execute osc with args "status"
|
||||
And stdout is
|
||||
"""
|
||||
D test-pkgA.changes
|
||||
A test-pkgA.changes-1
|
||||
"""
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" does not exist
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes-1" exists
|
||||
When I execute osc with args "mv test-pkgA.changes-1 test-pkgA.changes-2"
|
||||
Then the exit code is 0
|
||||
And I execute osc with args "status"
|
||||
And stdout is
|
||||
"""
|
||||
D test-pkgA.changes
|
||||
A test-pkgA.changes-2
|
||||
"""
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" does not exist
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes-2" exists
|
||||
When I execute osc with args "mv test-pkgA.changes-2 test-pkgA.changes-3"
|
||||
Then the exit code is 0
|
||||
And I execute osc with args "status"
|
||||
And stdout is
|
||||
"""
|
||||
D test-pkgA.changes
|
||||
A test-pkgA.changes-3
|
||||
"""
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" does not exist
|
||||
And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes-3" exists
|
||||
|
Reference in New Issue
Block a user