diff scripts/io/textscan.m @ 15263:2136343014d5

bug #37023 (wrong reading of lines starting and/or ending with whitespace) * strread.m: fix regexprep regular expression, test added, improved format specifier parsing * textscan.m: test added
author Philip Nienhuis <prnienhuis@users.sf.net>
date Thu, 30 Aug 2012 20:52:40 +0200
parents 5d3a684236b0
children 6251fa48d28b
line wrap: on
line diff
--- a/scripts/io/textscan.m
+++ b/scripts/io/textscan.m
@@ -402,3 +402,9 @@
 %! R = textscan (['Empty1' char(10)], 'Empty%d %f');
 %! assert (R{1}, int32 (1));
 %! assert (isempty (R{2}), true);
+
+%% bug #37023 (actually a strread test)
+%!test
+%! data = textscan("   1. 1 \n 2 3\n", '%f %f');
+%! assert (data{1}, [1; 2], 1e-15);
+%! assert (data{2}, [1; 3], 1e-15);