@@ -4,9 +4,9 @@ package dockerfile
44
55import "testing"
66
7- func TestNormaliseWorkdir (t * testing.T ) {
7+ func TestNormalizeWorkdir (t * testing.T ) {
88 tests := []struct { platform , current , requested , expected , etext string }{
9- {"windows" , `` , `` , `` , `cannot normalise nothing` },
9+ {"windows" , `` , `` , `` , `cannot normalize nothing` },
1010 {"windows" , `` , `C:` , `` , `C:. is not a directory. If you are specifying a drive letter, please add a trailing '\'` },
1111 {"windows" , `` , `C:.` , `` , `C:. is not a directory. If you are specifying a drive letter, please add a trailing '\'` },
1212 {"windows" , `c:` , `\a` , `` , `c:. is not a directory. If you are specifying a drive letter, please add a trailing '\'` },
@@ -21,26 +21,26 @@ func TestNormaliseWorkdir(t *testing.T) {
2121 {"windows" , `C:\foo` , `bar` , `C:\foo\bar` , `` },
2222 {"windows" , `C:\foo` , `/bar` , `C:\bar` , `` },
2323 {"windows" , `C:\foo` , `\bar` , `C:\bar` , `` },
24- {"linux" , `` , `` , `` , `cannot normalise nothing` },
24+ {"linux" , `` , `` , `` , `cannot normalize nothing` },
2525 {"linux" , `` , `foo` , `/foo` , `` },
2626 {"linux" , `` , `/foo` , `/foo` , `` },
2727 {"linux" , `/foo` , `bar` , `/foo/bar` , `` },
2828 {"linux" , `/foo` , `/bar` , `/bar` , `` },
2929 {"linux" , `\a` , `b\c` , `/a/b/c` , `` },
3030 }
3131 for _ , i := range tests {
32- r , e := normaliseWorkdir (i .platform , i .current , i .requested )
32+ r , e := normalizeWorkdir (i .platform , i .current , i .requested )
3333
3434 if i .etext != "" && e == nil {
35- t .Fatalf ("TestNormaliseWorkingDir Expected error %s for '%s' '%s', got no error" , i .etext , i .current , i .requested )
35+ t .Fatalf ("TestNormalizeWorkingDir Expected error %s for '%s' '%s', got no error" , i .etext , i .current , i .requested )
3636 }
3737
3838 if i .etext != "" && e .Error () != i .etext {
39- t .Fatalf ("TestNormaliseWorkingDir Expected error %s for '%s' '%s', got %s" , i .etext , i .current , i .requested , e .Error ())
39+ t .Fatalf ("TestNormalizeWorkingDir Expected error %s for '%s' '%s', got %s" , i .etext , i .current , i .requested , e .Error ())
4040 }
4141
4242 if r != i .expected {
43- t .Fatalf ("TestNormaliseWorkingDir Expected '%s' for '%s' '%s', got '%s'" , i .expected , i .current , i .requested , r )
43+ t .Fatalf ("TestNormalizeWorkingDir Expected '%s' for '%s' '%s', got '%s'" , i .expected , i .current , i .requested , r )
4444 }
4545 }
4646}
0 commit comments