create destination directory

This commit is contained in:
itchyny 2020-01-08 16:39:30 +09:00
parent f098269a11
commit 8197e82aaa
2 changed files with 38 additions and 1 deletions

View file

@ -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) {