Skip to content

Commit

Permalink
make test script run on MATLAB R2010b
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Oct 29, 2023
1 parent 2294473 commit ea4a4fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/run_jsonlab_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea4a4fd

Please sign in to comment.