Home / Function/ TestRouteRawPathNoUnescape() — gin Function Reference

TestRouteRawPathNoUnescape() — gin Function Reference

Architecture documentation for the TestRouteRawPathNoUnescape() function in routes_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  2fae4150_bf72_cb6e_7cbc_1a11067a1498["TestRouteRawPathNoUnescape()"]
  45929e18_70ca_7c55_01e0_596be99dd824["routes_test.go"]
  2fae4150_bf72_cb6e_7cbc_1a11067a1498 -->|defined in| 45929e18_70ca_7c55_01e0_596be99dd824
  9785c910_0083_377a_37b6_92b299e0e32d["PerformRequest()"]
  2fae4150_bf72_cb6e_7cbc_1a11067a1498 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d
  style 2fae4150_bf72_cb6e_7cbc_1a11067a1498 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

routes_test.go lines 699–717

func TestRouteRawPathNoUnescape(t *testing.T) {
	route := New()
	route.UseRawPath = true
	route.UnescapePathValues = false

	route.POST("/project/:name/build/:num", func(c *Context) {
		name := c.Params.ByName("name")
		num := c.Params.ByName("num")

		assert.Equal(t, name, c.Param("name"))
		assert.Equal(t, num, c.Param("num"))

		assert.Equal(t, "Some%2FOther%2FProject", name)
		assert.Equal(t, "333", num)
	})

	w := PerformRequest(route, http.MethodPost, "/project/Some%2FOther%2FProject/build/333")
	assert.Equal(t, http.StatusOK, w.Code)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestRouteRawPathNoUnescape() do?
TestRouteRawPathNoUnescape() is a function in the gin codebase, defined in routes_test.go.
Where is TestRouteRawPathNoUnescape() defined?
TestRouteRawPathNoUnescape() is defined in routes_test.go at line 699.
What does TestRouteRawPathNoUnescape() call?
TestRouteRawPathNoUnescape() calls 1 function(s): PerformRequest.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free