mirror of
https://github.com/itchyny/mmv.git
synced 2025-12-26 14:14:57 +08:00
create destination directory
This commit is contained in:
parent
f098269a11
commit
8197e82aaa
2 changed files with 38 additions and 1 deletions
19
mmv_test.go
19
mmv_test.go
|
|
@ -233,6 +233,25 @@ func TestRename(t *testing.T) {
|
|||
},
|
||||
err: &sameDestinationError{"foo"},
|
||||
},
|
||||
{
|
||||
name: "create destination directory",
|
||||
files: map[string]string{
|
||||
"foo": "x/foo",
|
||||
"bar": "x/bar",
|
||||
"baz": "a/b/c/baz",
|
||||
},
|
||||
count: 3,
|
||||
contents: map[string]string{
|
||||
"foo": "0",
|
||||
"bar": "1",
|
||||
"baz": "2",
|
||||
},
|
||||
expected: map[string]string{
|
||||
"x/foo": "0",
|
||||
"x/bar": "1",
|
||||
"a/b/c/baz": "2",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue