Skip to content

Commit 8cbd215

Browse files
committed
Add tests for -0
1 parent 36ebbde commit 8cbd215

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/tests.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ var tests = [
99
'position': -1,
1010
'result': undefined
1111
},
12+
{
13+
'string': 'abc\uD834\uDF06def',
14+
'position': -0,
15+
'result': 0x61
16+
},
1217
{
1318
'string': 'abc\uD834\uDF06def',
1419
'position': 0,
@@ -80,6 +85,11 @@ var tests = [
8085
'position': -1,
8186
'result': undefined
8287
},
88+
{
89+
'string': '\uD834\uDF06def',
90+
'position': -0,
91+
'result': 0x1D306
92+
},
8393
{
8494
'string': '\uD834\uDF06def',
8595
'position': 0,
@@ -131,6 +141,11 @@ var tests = [
131141
'position': -1,
132142
'result': undefined
133143
},
144+
{
145+
'string': '\uD834abc',
146+
'position': -0,
147+
'result': 0xD834
148+
},
134149
{
135150
'string': '\uD834abc',
136151
'position': 0,
@@ -172,6 +187,11 @@ var tests = [
172187
'position': -1,
173188
'result': undefined
174189
},
190+
{
191+
'string': '\uDF06abc',
192+
'position': -0,
193+
'result': 0xDF06
194+
},
175195
{
176196
'string': '\uDF06abc',
177197
'position': 0,

0 commit comments

Comments
 (0)