mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 12:37:48 +00:00
@@ -42,6 +42,16 @@ func TestCheckPathOverlap(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCheckPathOverlap_CheckSlash(t *testing.T) {
|
||||
pathA := `/Users/pb33f`
|
||||
pathB := `Users/pb33f\files\thing.yaml`
|
||||
expected := `/Users/pb33f/files\thing.yaml`
|
||||
result := CheckPathOverlap(pathA, pathB, `\`)
|
||||
if result != expected {
|
||||
t.Errorf("Expected %s, got %s", expected, result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCheckPathOverlap_VariationA(t *testing.T) {
|
||||
pathA := `/Users/pb33f`
|
||||
pathB := `pb33f/files/thing.yaml`
|
||||
|
||||
Reference in New Issue
Block a user