File: uri_windows_test.go

package info (click to toggle)
golang-github-valyala-fasthttp 1%3A1.59.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,932 kB
  • sloc: makefile: 34
file content (20 lines) | stat: -rw-r--r-- 451 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package fasthttp

import "testing"

func TestURIPathNormalizeIssue86(t *testing.T) {
	t.Parallel()

	// see https://github.com/valyala/fasthttp/issues/86
	var u URI

	testURIPathNormalize(t, &u, `C:\a\b\c\fs.go`, `C:\a\b\c\fs.go`)

	testURIPathNormalize(t, &u, `a`, `/a`)

	testURIPathNormalize(t, &u, "/../../../../../foo", "/foo")

	testURIPathNormalize(t, &u, "/..\\..\\..\\..\\..\\", "/")

	testURIPathNormalize(t, &u, "/..%5c..%5cfoo", "/foo")
}