Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
og-rek
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
og-rek
Commits
14ad4164
Commit
14ad4164
authored
Jun 19, 2015
by
liaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test case and fix loss of character '
parent
bd1466fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
ogórek.go
ogórek.go
+1
-0
ogórek_test.go
ogórek_test.go
+1
-0
No files found.
ogórek.go
View file @
14ad4164
...
...
@@ -489,6 +489,7 @@ func (d *Decoder) loadUnicode() error {
var
r
rune
var
err
error
for
len
(
sline
)
>
0
&&
sline
[
0
]
==
'\'
'
{
buf
.
WriteByte
(
sline
[
0
])
sline
=
sline
[
1
:
]
}
if
len
(
sline
)
==
0
{
...
...
ogórek_test.go
View file @
14ad4164
...
...
@@ -52,6 +52,7 @@ func TestDecode(t *testing.T) {
{
"list of numbers"
,
"(lp0
\n
I1
\n
aI2
\n
aI3
\n
aI4
\n
a."
,
[]
interface
{}{
int64
(
1
),
int64
(
2
),
int64
(
3
),
int64
(
4
)}},
{
"string"
,
"S'abc'
\n
p0
\n
."
,
string
(
"abc"
)},
{
"unicode"
,
"V
\\
u65e5
\\
u672c
\\
u8a9e
\n
p0
\n
."
,
string
(
"日本語"
)},
{
"unicode"
,
"V'
\\
u77e5
\\
u4e8b
\\
u5c11
\\
u65f6
\\
u70e6
\\
u607c
\\
u5c11
\\
u3001
\\
u8bc6
\\
u4eba
\\
u591a
\\
u5904
\\
u662f
\\
u975e
\\
u591a
\\
u3002"
,
string
(
"' 知事少时烦恼少、识人多处是非多。"
)},
{
"empty dict"
,
"(dp0
\n
."
,
make
(
map
[
interface
{}]
interface
{})},
{
"dict with strings"
,
"(dp0
\n
S'a'
\n
p1
\n
S'1'
\n
p2
\n
sS'b'
\n
p3
\n
S'2'
\n
p4
\n
s."
,
map
[
interface
{}]
interface
{}{
"a"
:
"1"
,
"b"
:
"2"
}},
{
"GLOBAL and REDUCE opcodes"
,
"cfoo
\n
bar
\n
S'bing'
\n\x85
R."
,
Call
{
Callable
:
Class
{
Module
:
"foo"
,
Name
:
"bar"
},
Args
:
[]
interface
{}{
"bing"
}}},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment