We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2044e1e commit 286828eCopy full SHA for 286828e
bytesconv_test.go
@@ -6,12 +6,28 @@ import (
6
"fmt"
7
"html"
8
"net"
9
+ "net/url"
10
"testing"
11
"time"
12
13
"github.com/valyala/bytebufferpool"
14
)
15
16
+func TestAppendQuotedArg(t *testing.T) {
17
+ t.Parallel()
18
+
19
+ // Sync with url.QueryEscape
20
+ allcases := make([]byte, 256)
21
+ for i := 0; i < 256; i++ {
22
+ allcases[i] = byte(i)
23
+ }
24
+ res := string(AppendQuotedArg(nil, allcases))
25
+ expect := url.QueryEscape(string(allcases))
26
+ if res != expect {
27
+ t.Fatalf("unexpected string %q. Expecting %q.", res, expect)
28
29
+}
30
31
func TestAppendHTMLEscape(t *testing.T) {
32
t.Parallel()
33
0 commit comments