add zip and parity stuff
This commit is contained in:
36
fileUtilities/zip_test.go
Normal file
36
fileUtilities/zip_test.go
Normal file
@ -0,0 +1,36 @@
|
||||
package fileUtilities
|
||||
|
||||
import "testing"
|
||||
|
||||
func Test_replaceBackslashes(t *testing.T) {
|
||||
type args struct {
|
||||
input string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "replace backslashes",
|
||||
args: args{
|
||||
input: "C:\\Users\\james\\Documents\\test",
|
||||
},
|
||||
want: "C:/Users/james/Documents/test",
|
||||
},
|
||||
{
|
||||
name: "no backslashes",
|
||||
args: args{
|
||||
input: "C:/Users/james/Documents/test",
|
||||
},
|
||||
want: "C:/Users/james/Documents/test",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := replaceBackslashes(tt.args.input); got != tt.want {
|
||||
t.Errorf("replaceBackslashes() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user