Bake in thread directives
This commit is contained in:
@@ -199,11 +199,12 @@ func TestValidateWorkspacePath(t *testing.T) {
|
||||
if _, err := ValidateWorkspacePath("/"); err == nil {
|
||||
t.Fatal("filesystem root should be rejected")
|
||||
}
|
||||
clean, err := ValidateWorkspacePath("/tmp/../tmp/project")
|
||||
input := string(filepath.Separator) + filepath.Join("tmp", "..", "tmp", "project")
|
||||
clean, err := ValidateWorkspacePath(input)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if clean != "/tmp/project" {
|
||||
if clean != filepath.Join(string(filepath.Separator), "tmp", "project") {
|
||||
t.Fatalf("unexpected clean path: %s", clean)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user