Source-Changes-HG archive

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

[src/trunk]: src tests/libcurses: add test for addbytes



details:   https://anonhg.NetBSD.org/src/rev/525b73c5bd07
branches:  trunk
changeset: 952325:525b73c5bd07
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Feb 13 06:29:45 2021 +0000

description:
tests/libcurses: add test for addbytes

diffstat:

 distrib/sets/lists/tests/mi        |   3 ++-
 tests/lib/libcurses/t_curses.sh    |  12 +++++++++++-
 tests/lib/libcurses/tests/Makefile |   3 ++-
 tests/lib/libcurses/tests/addbytes |  17 +++++++++++++++++
 4 files changed, 32 insertions(+), 3 deletions(-)

diffs (88 lines):

diff -r b36faf064c32 -r 525b73c5bd07 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sat Feb 13 06:24:08 2021 +0000
+++ b/distrib/sets/lists/tests/mi       Sat Feb 13 06:29:45 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1016 2021/02/07 01:53:54 rillig Exp $
+# $NetBSD: mi,v 1.1017 2021/02/13 06:29:45 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3523,6 +3523,7 @@
 ./usr/tests/lib/libcurses/terminfo.db                  tests-obsolete          obsolete
 ./usr/tests/lib/libcurses/tests                                tests-lib-tests         compattestfile,atf
 ./usr/tests/lib/libcurses/tests/add_wch                        tests-lib-tests         compattestfile,atf
+./usr/tests/lib/libcurses/tests/addbytes               tests-lib-tests         compattestfile,atf
 ./usr/tests/lib/libcurses/tests/addch                  tests-lib-tests         compattestfile,atf
 ./usr/tests/lib/libcurses/tests/addchnstr              tests-lib-tests         compattestfile,atf
 ./usr/tests/lib/libcurses/tests/addchstr               tests-lib-tests         compattestfile,atf
diff -r b36faf064c32 -r 525b73c5bd07 tests/lib/libcurses/t_curses.sh
--- a/tests/lib/libcurses/t_curses.sh   Sat Feb 13 06:24:08 2021 +0000
+++ b/tests/lib/libcurses/t_curses.sh   Sat Feb 13 06:29:45 2021 +0000
@@ -98,6 +98,16 @@
 # curses add characters to window routines
 ##########################################
 
+atf_test_case addbytes
+addbytes_head()
+{
+       atf_set "descr" "Tests adding bytes to stdscr"
+}
+addbytes_body()
+{
+       h_run addbytes
+}
+
 atf_test_case addch
 addch_head()
 {
@@ -2172,6 +2182,7 @@
        atf_add_test_case varcheck
 
        # curses add characters to window routines
+       atf_add_test_case addbytes
        atf_add_test_case addch
        atf_add_test_case waddch
        atf_add_test_case mvaddch
@@ -2416,4 +2427,3 @@
        atf_add_test_case underscore
        atf_add_test_case wunderscore
 }
-
diff -r b36faf064c32 -r 525b73c5bd07 tests/lib/libcurses/tests/Makefile
--- a/tests/lib/libcurses/tests/Makefile        Sat Feb 13 06:24:08 2021 +0000
+++ b/tests/lib/libcurses/tests/Makefile        Sat Feb 13 06:29:45 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2020/10/24 14:21:26 martin Exp $
+# $NetBSD: Makefile,v 1.5 2021/02/13 06:29:45 rillig Exp $
 
 NOMAN=         # defined
 
@@ -11,6 +11,7 @@
 FILESDIR=      ${TESTSDIR}/tests
 FILES=         start
 FILES+=                add_wch
+FILES+=                addbytes
 FILES+=                addch
 FILES+=                addchnstr
 FILES+=                addchstr
diff -r b36faf064c32 -r 525b73c5bd07 tests/lib/libcurses/tests/addbytes
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libcurses/tests/addbytes        Sat Feb 13 06:29:45 2021 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: addbytes,v 1.1 2021/02/13 06:29:45 rillig Exp $
+#
+# Tests adding bytes to stdscr.
+
+include start
+
+call OK addbytes "\t" 1
+call2 0 8 getyx STDSCR
+
+call OK addbytes "123456" 6
+call2 0 14 getyx STDSCR
+
+call OK addbytes "\t" 1
+call2 0 16 getyx STDSCR
+
+call OK addbytes "\n" 1
+call2 1 0 getyx STDSCR



Home | Main Index | Thread Index | Old Index