diff test/test_io.m @ 12984:7626f8934466 stable

correctly resize scanf output for %c formats (bug #34037) * oct-stream.cc (BEGIN_C_CONVERSION): Resize tmp buffer to number of characters read.
author John W. Eaton <jwe@octave.org>
date Mon, 22 Aug 2011 20:27:27 -0400
parents fd0a3ac60b0e
children 7872afb42fab
line wrap: on
line diff
--- a/test/test_io.m
+++ b/test/test_io.m
@@ -242,6 +242,9 @@
 %% test/octave.test/io/puts-4.m
 %!error <Invalid call to puts.*> puts (1, 2);
 
+%!assert (sscanf ('123456', '%10c'), '123456')
+%!assert (sscanf ('123456', '%10s'), '123456')
+
 %% test/octave.test/io/sscanf-1.m
 %!test
 %! [a, b, c] = sscanf ("1.2 3 foo", "%f%d%s", "C");