Mercurial > jwe > octave
comparison test/bug-50831/bug-50831.tst @ 28166:ef349f5c320b
Load structures with arbitrary string fieldnames (bug #50831, bug #46645).
* ls-oct-text.h, ls-oct-text.cc (read_text_data): Consider additional optional
bool argument to skip validation of input name.
* ov-struct.cc (octave_struct::load_ascii, octave_scalar_struct::load_ascii):
Call read_text_data with additional argument (skip_validation), set to true.
* test/bug-50831/bug-50831.tst, test/bug-50831/module.mk: New test files.
author | Olaf Till <i7tiol@t-online.de> |
---|---|
date | Wed, 19 Apr 2017 15:06:31 +0200 |
parents | |
children | 6beb610b3bcd |
comparison
equal
deleted
inserted
replaced
28165:478ad929e77a | 28166:ef349f5c320b |
---|---|
1 %!test | |
2 %! filename = "save-text.var"; | |
3 %! s.("a-b") = "bad fieldname"; | |
4 %! unwind_protect | |
5 %! save ("-text", filename, "s"); | |
6 %! filevar = load (filename); | |
7 %! assert (filevar.s, s); | |
8 %! unwind_protect_cleanup | |
9 %! sts = unlink (filename); | |
10 %! end_unwind_protect |