From ea4a4fd478dee960e5719cbe8246fd09cdd5e2ee Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Sun, 29 Oct 2023 10:52:51 -0400 Subject: [PATCH] make test script run on MATLAB R2010b --- test/run_jsonlab_test.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run_jsonlab_test.m b/test/run_jsonlab_test.m index 43fcf6b..ac2330a 100644 --- a/test/run_jsonlab_test.m +++ b/test/run_jsonlab_test.m @@ -194,7 +194,7 @@ function run_jsonlab_test(tests) test_jsonlab('empty string',@savebj,'','SU<0>','debug',1); test_jsonlab('skip no-op before marker and after value',@savebj,loadbj(char(['NN[NU' char(5) 'NNNU' char(1) ']'])),'[$U#U<2><5><1>','debug',1); test_jsonlab('string escape',@savebj,sprintf('jdata\n\b\ashall\tprevail\t"\"\\'),sprintf('SU<25>jdata\n\b\ashall\tprevail\t\"\"\\'),'debug',1); - if(exist('string')) + if(exist('string') && isa(string('jdata'),'string')) test_jsonlab('string type',@savebj,string(sprintf('jdata\n\b\ashall\tprevail')),sprintf('[SU<21>jdata\n\b\ashall\tprevail]'),'debug',1); test_jsonlab('string array',@savebj,[string('jdata');string('shall');string('prevail')],'[[SU<5>jdataSU<5>shallSU<7>prevail]]','debug',1); end