Make literal $ character work in set $location_path
This commit is contained in:
parent
be5b86fa8f
commit
3dc131bd57
3 changed files with 35 additions and 1 deletions
|
|
@ -834,3 +834,16 @@ func TestBuildUpstreamName(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestEscapeLocationPathVar(t *testing.T) {
|
||||
escapedPath := escapeLocationPathVar("/$")
|
||||
expected := "/${literal_dollar}"
|
||||
if escapedPath != expected {
|
||||
t.Errorf("Expected %s but got %s", expected, escapedPath)
|
||||
}
|
||||
escapedPath = escapeLocationPathVar(false)
|
||||
expected = ""
|
||||
if escapedPath != expected {
|
||||
t.Errorf("Expected %s but got %s", expected, escapedPath)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue