diff options
author | Gokcehan <gokcehankara@gmail.com> | 2019-10-25 20:50:00 +0300 |
---|---|---|
committer | Gokcehan <gokcehankara@gmail.com> | 2019-10-25 20:50:00 +0300 |
commit | 0482340d5e9354db00b941616a95559081035ce1 (patch) | |
tree | 446cfbbb8fb1466d25e6d8a437d819c4d2d3089f /misc_test.go | |
parent | 7a4d1cc2757b267dc23b00254ac9498d3634dc49 (diff) |
keep trailing backslash during reverse escape
Diffstat (limited to 'misc_test.go')
-rw-r--r-- | misc_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/misc_test.go b/misc_test.go index a383301..920f99a 100644 --- a/misc_test.go +++ b/misc_test.go @@ -86,6 +86,7 @@ func TestEscape(t *testing.T) { {`foo#bar`, `foo\#bar`}, {`foo\tbar`, `foo\\tbar`}, {"foo\tbar", "foo\\\tbar"}, + {`foo\`, `foo\\`}, } for _, test := range tests { @@ -110,6 +111,7 @@ func TestUnescape(t *testing.T) { {`foo\#bar`, `foo#bar`}, {`foo\\tbar`, `foo\tbar`}, {"foo\\\tbar", "foo\tbar"}, + {`foo\`, `foo\`}, } for _, test := range tests { |