diff options
author | xuri <xuri.me@gmail.com> | 2021-06-13 11:23:52 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-06-13 11:23:52 +0800 |
commit | e354db69b0bdd02357c221af9ef09695dd8fd122 (patch) | |
tree | bc62fe93685f7dccdcbc399e35adcf2362bd2700 /lib_test.go | |
parent | 5faa36430cd77ae256a79cb52a7808d540da50da (diff) |
string pattern match context check instead of regex lookahead assertion
Diffstat (limited to 'lib_test.go')
-rw-r--r-- | lib_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib_test.go b/lib_test.go index 58c6ed9..ad20946 100644 --- a/lib_test.go +++ b/lib_test.go @@ -237,19 +237,22 @@ func TestGenXMLNamespace(t *testing.T) { func TestBstrUnmarshal(t *testing.T) { bstrs := map[string]string{ - "*_x0000_": "*", "*": "*", + "*_x0000_": "*", "*_x0008_": "*", "_x0008_*": "*", "*_x0008_*": "**", "*_x4F60__x597D_": "*你好", + "*_xG000_": "*_xG000_", + "*_xG05F_x0001_*": "*_xG05F*", "*_x005F__x0008_*": "*_x005F_*", "*_x005F_x0001_*": "*_x0001_*", + "*_x005f_x005F__x0008_*": "*_x005F_*", + "*_x005F_x005F_xG05F_x0006_*": "*_x005F_xG05F*", "*_x005F_x005F_x005F_x0006_*": "*_x005F_x0006_*", "_x005F__x0008_******": "_x005F_******", "******_x005F__x0008_": "******_x005F_", "******_x005F__x0008_******": "******_x005F_******", - "*_x005F_x005F__x0008_*": "*_x005F_*", } for bstr, expected := range bstrs { assert.Equal(t, expected, bstrUnmarshal(bstr)) |