Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoisaiah committed Oct 17, 2024
1 parent ed894d1 commit acd4ebf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/sortfiles/sortfiles_test/sortfiles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ func TestSortFiles_ByTime(t *testing.T) {
t.Fatal(err)
}

time.Sleep(1 * time.Millisecond)
time.Sleep(10 * time.Millisecond)
}
}

Expand All @@ -690,7 +690,7 @@ func TestSortFiles_ByTime(t *testing.T) {
t.Fatal(err)
}

time.Sleep(1 * time.Millisecond)
time.Sleep(10 * time.Millisecond)
}
}

Expand Down
31 changes: 31 additions & 0 deletions replace/replace_test/replace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,37 @@ func TestReplace(t *testing.T) {
},
Args: []string{"-f", ".*", "-r", "picture-{%03d}", "--pair"},
},
{
Name: "rename file pairs with a different target directory",
Changes: file.Changes{
{
Source: "image.dng",
TargetDir: "pictures",
},
{
Source: "image.heif",
TargetDir: "pictures",
},
{
Source: "image.jpg",
TargetDir: "pictures",
},
},
Want: []string{
"pictures/picture-001.dng",
"pictures/picture-001.heif",
"pictures/picture-001.jpg",
},
Args: []string{
"-f",
".*",
"-r",
"picture-{%03d}",
"--pair",
"-t",
"pictures",
},
},
}

replaceTest(t, testCases)
Expand Down

0 comments on commit acd4ebf

Please sign in to comment.