Update file_path_test.go
Added tests for trailing backslash and other custom paths
@@ -19,6 +19,21 @@ func TestPathValidation(t *testing.T) {
TestName: "Default Path",
ErrCount: 0,
},
+ {
+ Value: `\SomePath`,
+ TestName: "Custom Path",
+ ErrCount: 0,
+ },
+ {
+ Value: `\Some Path`,
+ TestName: "Custom Path With Whitespace",
+ ErrCount: 0,
+ },
+ {
+ Value: `\Some Path\With Nested\Folders`,
+ TestName: "Custom Nested Path",
+ ErrCount: 0,
+ },
{
Value: "",
TestName: "Empty Path",
@@ -29,6 +44,11 @@ func TestPathValidation(t *testing.T) {
TestName: "Wrong Starting Character",
ErrCount: 1,
},
+ {
+ Value: "\Some Path\",
+ TestName: "Wrong Ending Character",
+ ErrCount: 1,
+ },
}
illegalChars := []string{"<", ">", "|", ":", "$", "@", `"`, "/", "%", "+", "*", "?"}
