@@ -55,18 +55,18 @@ func createTestFile(path string, baseName string, content string) (string, fs.Di
5555 return dirName , fInfo , f .Name ()
5656}
5757
58- // assertFileExistsBeforeRename ensures that the file at the given path exists
58+ // assertPathExistsBeforeRename ensures that the file at the given path exists
5959// prior to being renamed.
60- func assertFileExistsBeforeRename (t * testing.T , path string ) {
60+ func assertPathExistsBeforeRename (t * testing.T , path string ) {
6161 // Ensure file exists as expected before renaming
6262 if _ , err := os .Stat (path ); errors .Is (err , os .ErrNotExist ) {
6363 t .Errorf ("test file %v does not exist" , path )
6464 }
6565}
6666
67- // assertFileExistsAfterRename ensures that the file at oldPath no longer
67+ // assertPathExistsAfterRename ensures that the file at oldPath no longer
6868// exists, and that a file at newPath exists instead.
69- func assertFileExistsAfterRename (t * testing.T , oldPath string , newPath string ) {
69+ func assertPathExistsAfterRename (t * testing.T , oldPath string , newPath string ) {
7070 if _ , err := os .Stat (oldPath ); err == nil {
7171 t .Errorf ("test file %v still exists after it was supposed to be renamed to %v" , oldPath , newPath )
7272 }
@@ -88,9 +88,9 @@ func TestHandleFileWithFile(t *testing.T) {
8888 defer os .Remove (expectedPath )
8989 fr := findReplace {find : find , replace : replace }
9090
91- assertFileExistsBeforeRename (t , path )
91+ assertPathExistsBeforeRename (t , path )
9292 fr .HandleFile (dirName , fInfo )
93- assertFileExistsAfterRename (t , path , expectedPath )
93+ assertPathExistsAfterRename (t , path , expectedPath )
9494
9595 got := readFile (expectedPath )
9696 if got != want {
@@ -110,9 +110,9 @@ func TestRenameFile(t *testing.T) {
110110 defer os .Remove (expectedPath )
111111 fr := findReplace {find : find , replace : replace }
112112
113- assertFileExistsBeforeRename (t , path )
113+ assertPathExistsBeforeRename (t , path )
114114 fr .RenameFile (dirName , fInfo )
115- assertFileExistsAfterRename (t , path , expectedPath )
115+ assertPathExistsAfterRename (t , path , expectedPath )
116116}
117117
118118// assertNewContentsOfFile ensures that the contents of the file at the given
0 commit comments