changeset 28184:c805c1b541fa

test: Add BIST test for textscan (Bug #51093). * file-io.cc (Ftextscan): Add BIST test for Bug #51093.
author Rik <rik@octave.org>
date Sun, 29 Mar 2020 12:53:19 -0700
parents abcff237241f
children 493d46a02edc
files libinterp/corefcn/file-io.cc
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc	Sun Mar 29 11:26:16 2020 -0700
+++ b/libinterp/corefcn/file-io.cc	Sun Mar 29 12:53:19 2020 -0700
@@ -2316,6 +2316,11 @@
 %! assert (C{1}, { "101"; "201" });
 %! assert (C{2}, int32 ([ 0; 0 ]));
 
+%!test <*51093>
+%! str = sprintf ('a\t\tb\tc');
+%! C = textscan (str, '%s', 'Delimiter', '\t', 'MultipleDelimsAsOne', false);
+%! assert (C{1}, {'a'; ''; 'b'; 'c'});
+
 */
 
 // These tests have end-comment sequences, so can't just be in a comment