Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libcurses Fixed mvscanw test but leave disabled fo...



details:   https://anonhg.NetBSD.org/src/rev/2bd08d617e3b
branches:  trunk
changeset: 842328:2bd08d617e3b
user:      blymn <blymn%NetBSD.org@localhost>
date:      Tue Jun 25 22:19:29 2019 +0000

description:
Fixed mvscanw test but leave disabled for the moment, the return for
mvscanw is incorrect in libcurses, we need a major lib version bump
to correct it.

diffstat:

 tests/lib/libcurses/t_curses.sh   |  2 +-
 tests/lib/libcurses/tests/mvscanw |  9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r ada9a8b95170 -r 2bd08d617e3b tests/lib/libcurses/t_curses.sh
--- a/tests/lib/libcurses/t_curses.sh   Tue Jun 25 21:32:58 2019 +0000
+++ b/tests/lib/libcurses/t_curses.sh   Tue Jun 25 22:19:29 2019 +0000
@@ -802,7 +802,7 @@
        atf_add_test_case mvhline
        atf_add_test_case mvinchnstr
        atf_add_test_case mvprintw
-#      atf_add_test_case mvscanw # not working
+#      atf_add_test_case mvscanw # disable for now - return is wrong
        atf_add_test_case mvvline
 #      atf_add_test_case pad # not working
        atf_add_test_case nocbreak
diff -r ada9a8b95170 -r 2bd08d617e3b tests/lib/libcurses/tests/mvscanw
--- a/tests/lib/libcurses/tests/mvscanw Tue Jun 25 21:32:58 2019 +0000
+++ b/tests/lib/libcurses/tests/mvscanw Tue Jun 25 22:19:29 2019 +0000
@@ -1,4 +1,11 @@
 include start
 input "testing 1 2 3\n"
 call2 OK "testing" mvscanw 3 5 "%s"
-compare /dev/null
+input "testing 1 2 3\n"
+call2 OK "test" mvscanw 3 5 "%4s"
+# 50 will translate into number 2 in ascii
+input "50 12\n"
+call2 OK "2" mvscanw 3 5 "%d"
+input "aa bb 50 12\n"
+# expect ERR becauss input has alpha and scanw wants integer
+call2 ERR "2" mvscanw 3 5 "%d"



Home | Main Index | Thread Index | Old Index