Home / Function/ Test_App_quoteRawString() — fiber Function Reference

Test_App_quoteRawString() — fiber Function Reference

Architecture documentation for the Test_App_quoteRawString() function in helpers_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  9bb17b62_3767_d906_4711_da475f4fd294["Test_App_quoteRawString()"]
  c82e3595_b1b8_f596_c097_f26fa40159d1["helpers_test.go"]
  9bb17b62_3767_d906_4711_da475f4fd294 -->|defined in| c82e3595_b1b8_f596_c097_f26fa40159d1
  style 9bb17b62_3767_d906_4711_da475f4fd294 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

helpers_test.go lines 1626–1651

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

	cases := []struct {
		name string
		in   string
		out  string
	}{
		{"empty", "", ""},
		{"simple", "simple", "simple"},
		{"backslash", "A\\B", "A\\\\B"},
		{"quote", `He said "Yo"`, `He said \"Yo\"`},
		{"newline", "Hello\n", "Hello\\n"},
		{"carriage", "Hello\r", "Hello\\r"},
		{"controls", string([]byte{0, 31, 127}), "%00%1F%7F"},
		{"mixed", "test \"A\n\r" + string([]byte{1}) + "\\", `test \"A\n\r%01\\`},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			t.Parallel()
			app := New()
			require.Equal(t, tc.out, app.quoteRawString(tc.in))
		})
	}
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_App_quoteRawString() do?
Test_App_quoteRawString() is a function in the fiber codebase, defined in helpers_test.go.
Where is Test_App_quoteRawString() defined?
Test_App_quoteRawString() is defined in helpers_test.go at line 1626.

Analyze Your Own Codebase

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

Try Supermodel Free