Skip to content

Commit fc2457e

Browse files
committed
patch 7.4.1455
Problem: JSON decoding test for surrogate pairs is in the wrong place. Solution: Move the test lines. (Ken Takata)
1 parent 9730f74 commit fc2457e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/testdir/test_json.vim

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ func Test_json_encode()
8282

8383
if has('multi_byte')
8484
call assert_equal(s:jsonmb, json_encode(s:varmb))
85-
call assert_equal(s:varsp1, json_decode(s:jsonsp1))
86-
call assert_equal(s:varsp2, json_decode(s:jsonsp2))
85+
" no test for surrogate pair, json_encode() doesn't create them.
8786
endif
8887

8988
call assert_equal(s:jsonnr, json_encode(s:varnr))
@@ -120,8 +119,8 @@ func Test_json_decode()
120119

121120
if has('multi_byte')
122121
call assert_equal(s:varmb, json_decode(s:jsonmb))
123-
call assert_equal(s:varsp1, js_decode(s:jsonsp1))
124-
call assert_equal(s:varsp2, js_decode(s:jsonsp2))
122+
call assert_equal(s:varsp1, json_decode(s:jsonsp1))
123+
call assert_equal(s:varsp2, json_decode(s:jsonsp2))
125124
endif
126125

127126
call assert_equal(s:varnr, json_decode(s:jsonnr))
@@ -185,6 +184,7 @@ func Test_js_encode()
185184

186185
if has('multi_byte')
187186
call assert_equal(s:jsonmb, js_encode(s:varmb))
187+
" no test for surrogate pair, js_encode() doesn't create them.
188188
endif
189189

190190
call assert_equal(s:jsonnr, js_encode(s:varnr))
@@ -223,6 +223,8 @@ func Test_js_decode()
223223

224224
if has('multi_byte')
225225
call assert_equal(s:varmb, js_decode(s:jsonmb))
226+
call assert_equal(s:varsp1, js_decode(s:jsonsp1))
227+
call assert_equal(s:varsp2, js_decode(s:jsonsp2))
226228
endif
227229

228230
call assert_equal(s:varnr, js_decode(s:jsonnr))

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,8 @@ static char *(features[]) =
743743

744744
static int included_patches[] =
745745
{ /* Add new patch number below this line */
746+
/**/
747+
1455,
746748
/**/
747749
1454,
748750
/**/

0 commit comments

Comments
 (0)