patch 8.1.0811: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, the final chapter.
diff --git a/src/testdir/test_json.vim b/src/testdir/test_json.vim
index e0a550c..fb3d992 100644
--- a/src/testdir/test_json.vim
+++ b/src/testdir/test_json.vim
@@ -1,10 +1,5 @@
" Test for JSON functions.
-" JSON requires using utf-8, because conversion breaks the asserts.
-if !has('multi_byte')
- finish
-endif
-
let s:json1 = '"str\"in\\g"'
let s:var1 = "str\"in\\g"
let s:json2 = '"\u0001\u0002\u0003\u0004\u0005\u0006\u0007"'
@@ -79,10 +74,8 @@
call assert_equal(s:json4, json_encode(s:var4))
call assert_equal(s:json5, json_encode(s:var5))
- if has('multi_byte')
- call assert_equal(s:jsonmb, json_encode(s:varmb))
- " no test for surrogate pair, json_encode() doesn't create them.
- endif
+ call assert_equal(s:jsonmb, json_encode(s:varmb))
+ " no test for surrogate pair, json_encode() doesn't create them.
call assert_equal(s:jsonnr, json_encode(s:varnr))
if has('float')
@@ -121,11 +114,9 @@
call assert_equal(s:var4, json_decode(s:json4))
call assert_equal(s:var5, json_decode(s:json5))
- if has('multi_byte')
- call assert_equal(s:varmb, json_decode(s:jsonmb))
- call assert_equal(s:varsp1, json_decode(s:jsonsp1))
- call assert_equal(s:varsp2, json_decode(s:jsonsp2))
- endif
+ call assert_equal(s:varmb, json_decode(s:jsonmb))
+ call assert_equal(s:varsp1, json_decode(s:jsonsp1))
+ call assert_equal(s:varsp2, json_decode(s:jsonsp2))
call assert_equal(s:varnr, json_decode(s:jsonnr))
if has('float')
@@ -197,10 +188,8 @@
call assert_equal(s:json4, js_encode(s:var4))
call assert_equal(s:json5, js_encode(s:var5))
- if has('multi_byte')
- call assert_equal(s:jsonmb, js_encode(s:varmb))
- " no test for surrogate pair, js_encode() doesn't create them.
- endif
+ call assert_equal(s:jsonmb, js_encode(s:varmb))
+ " no test for surrogate pair, js_encode() doesn't create them.
call assert_equal(s:jsonnr, js_encode(s:varnr))
if has('float')
@@ -237,11 +226,9 @@
call assert_equal(s:var4, js_decode(s:json4))
call assert_equal(s:var5, js_decode(s:json5))
- if has('multi_byte')
- call assert_equal(s:varmb, js_decode(s:jsonmb))
- call assert_equal(s:varsp1, js_decode(s:jsonsp1))
- call assert_equal(s:varsp2, js_decode(s:jsonsp2))
- endif
+ call assert_equal(s:varmb, js_decode(s:jsonmb))
+ call assert_equal(s:varsp1, js_decode(s:jsonsp1))
+ call assert_equal(s:varsp2, js_decode(s:jsonsp2))
call assert_equal(s:varnr, js_decode(s:jsonnr))
if has('float')