diff options
author | nesstord <56038047+nesstord@users.noreply.github.com> | 2022-12-06 23:45:27 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 00:45:27 +0800 |
commit | 61fda0b1cad43ef7ce88ab7ad36be69fcd8cf8b3 (patch) | |
tree | 9c92c107bd30e575b855da6a6b1cd299fd663f18 /lib_test.go | |
parent | 5e0953d7783ce65707fa89f5a773697b69e82e96 (diff) |
Fix binary string regex (#1415)
Diffstat (limited to 'lib_test.go')
-rw-r--r-- | lib_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib_test.go b/lib_test.go index e96704f..ec5fd64 100644 --- a/lib_test.go +++ b/lib_test.go @@ -305,18 +305,19 @@ func TestBstrUnmarshal(t *testing.T) { "*_x0008_*": "*\b*", "*_x4F60__x597D_": "*你好", "*_xG000_": "*_xG000_", - "*_xG05F_x0001_*": "*_xG05F*", + "*_xG05F_x0001_*": "*_xG05F\x01*", "*_x005F__x0008_*": "*_\b*", "*_x005F_x0001_*": "*_x0001_*", "*_x005f_x005F__x0008_*": "*_x005F_\b*", - "*_x005F_x005F_xG05F_x0006_*": "*_x005F_xG05F*", + "*_x005F_x005F_xG05F_x0006_*": "*_x005F_xG05F\x06*", "*_x005F_x005F_x005F_x0006_*": "*_x005F_x0006_*", "_x005F__x0008_******": "_\b******", "******_x005F__x0008_": "******_\b", "******_x005F__x0008_******": "******_\b******", + "_x000x_x005F_x000x_": "_x000x_x000x_", } for bstr, expected := range bstrs { - assert.Equal(t, expected, bstrUnmarshal(bstr)) + assert.Equal(t, expected, bstrUnmarshal(bstr), bstr) } } |