77 "io/ioutil"
88 "net/url"
99 "os"
10- "path"
10+ "path/filepath "
1111 "strings"
1212 "testing"
1313
@@ -763,7 +763,7 @@ func TestFileArgs(t *testing.T) {
763763 tmpFile1 := mkTempFile (t , "" , "" , "test1" )
764764 tmpFile2 := mkTempFile (t , tmpDir1 , "" , "toBeIgnored" )
765765 tmpFile3 := mkTempFile (t , tmpDir1 , "" , "test3" )
766- ignoreFile := mkTempFile (t , tmpDir2 , "" , path .Base (tmpFile2 .Name ()))
766+ ignoreFile := mkTempFile (t , tmpDir2 , "" , filepath .Base (tmpFile2 .Name ()))
767767 tmpHiddenFile := mkTempFile (t , tmpDir1 , ".test_hidden_file_*" , "test" )
768768 defer func () {
769769 for _ , f := range []string {
@@ -790,27 +790,27 @@ func TestFileArgs(t *testing.T) {
790790 parseErr : fmt .Errorf ("argument %q is required" , "path" ),
791791 },
792792 {
793- cmd : words {"fileOp" , "--ignore" , path .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name ()}, f : nil ,
793+ cmd : words {"fileOp" , "--ignore" , filepath .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name ()}, f : nil ,
794794 args : words {tmpDir1 , tmpFile1 .Name (), tmpFile3 .Name ()},
795795 parseErr : fmt .Errorf (notRecursiveFmtStr , tmpDir1 , "r" ),
796796 },
797797 {
798- cmd : words {"fileOp" , tmpFile1 .Name (), "--ignore" , path .Base (tmpFile2 .Name ()), "--ignore" }, f : nil ,
798+ cmd : words {"fileOp" , tmpFile1 .Name (), "--ignore" , filepath .Base (tmpFile2 .Name ()), "--ignore" }, f : nil ,
799799 args : words {tmpDir1 , tmpFile1 .Name (), tmpFile3 .Name ()},
800800 parseErr : fmt .Errorf ("missing argument for option %q" , "ignore" ),
801801 },
802802 {
803- cmd : words {"fileOp" , "-r" , "--ignore" , path .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name ()}, f : nil ,
803+ cmd : words {"fileOp" , "-r" , "--ignore" , filepath .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name ()}, f : nil ,
804804 args : words {tmpDir1 , tmpFile1 .Name (), tmpFile3 .Name ()},
805805 parseErr : nil ,
806806 },
807807 {
808- cmd : words {"fileOp" , "--hidden" , "-r" , "--ignore" , path .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name ()}, f : nil ,
808+ cmd : words {"fileOp" , "--hidden" , "-r" , "--ignore" , filepath .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name ()}, f : nil ,
809809 args : words {tmpDir1 , tmpFile1 .Name (), tmpFile3 .Name (), tmpHiddenFile .Name ()},
810810 parseErr : nil ,
811811 },
812812 {
813- cmd : words {"fileOp" , "-r" , "--ignore" , path .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name (), "--ignore" , "anotherRule" }, f : nil ,
813+ cmd : words {"fileOp" , "-r" , "--ignore" , filepath .Base (tmpFile2 .Name ()), tmpDir1 , tmpFile1 .Name (), "--ignore" , "anotherRule" }, f : nil ,
814814 args : words {tmpDir1 , tmpFile1 .Name (), tmpFile3 .Name ()},
815815 parseErr : nil ,
816816 },
@@ -838,7 +838,7 @@ func TestFileArgs(t *testing.T) {
838838 }
839839 expectedFileMap := make (map [string ]bool )
840840 for _ , arg := range tc .args {
841- expectedFileMap [path .Base (arg )] = false
841+ expectedFileMap [filepath .Base (arg )] = false
842842 }
843843 it := req .Files .Entries ()
844844 for it .Next () {
0 commit comments