# HG changeset patch # User Markus Mützel # Date 1659546008 -7200 # Node ID e8a46f8018251be6c307b43dd618ec6555dcecbc # Parent bcd75c07c9e8f5cd0a0cb8364aeb3070f62debcc io.tst: Add test case for scanf (bug #62723). * test/io.tst: Add test case for sscanf that reaches the end of stream with a pattern that matches characters. diff -r bcd75c07c9e8 -r e8a46f801825 test/io.tst --- a/test/io.tst Tue Aug 02 18:46:24 2022 +0200 +++ b/test/io.tst Wed Aug 03 19:00:08 2022 +0200 @@ -387,6 +387,13 @@ %! assert (msg, ""); %! assert (pos, 6); +%!test <*62723> +%! [val, count, msg, pos] = sscanf ("p", "%c"); +%! assert (val, "p"); +%! assert (count, 1); +%! assert (msg, ""); +%! assert (pos, 2); + %!test %! [a, b, c] = sscanf ("1.2 3 foo", "%f%d%s", "C"); %! [v1, c1, m1] = sscanf ("1 2 3 4 5 6", "%d");