Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libcurses Add a test for the bkgrndset function



details:   https://anonhg.NetBSD.org/src/rev/3cc22ce62671
branches:  trunk
changeset: 365719:3cc22ce62671
user:      blymn <blymn%NetBSD.org@localhost>
date:      Wed Apr 20 07:43:05 2022 +0000

description:
Add a test for the bkgrndset function

diffstat:

 tests/lib/libcurses/check_files/Makefile       |   4 +++-
 tests/lib/libcurses/check_files/bkgrndset1.chk |   1 +
 tests/lib/libcurses/check_files/bkgrndset2.chk |   1 +
 tests/lib/libcurses/t_curses.sh                |  10 ++++++++++
 tests/lib/libcurses/tests/Makefile             |   3 ++-
 tests/lib/libcurses/tests/bkgrndset            |  10 ++++++++++
 6 files changed, 27 insertions(+), 2 deletions(-)

diffs (81 lines):

diff -r 42e617d4ab86 -r 3cc22ce62671 tests/lib/libcurses/check_files/Makefile
--- a/tests/lib/libcurses/check_files/Makefile  Wed Apr 20 07:41:04 2022 +0000
+++ b/tests/lib/libcurses/check_files/Makefile  Wed Apr 20 07:43:05 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2021/11/16 21:02:06 blymn Exp $
+# $NetBSD: Makefile,v 1.10 2022/04/20 07:43:05 blymn Exp $
 
 NOMAN=         # defined
 
@@ -34,6 +34,8 @@
 FILES+=                background5.chk
 FILES+=                bell.chk
 FILES+=                bkgdset1.chk
+FILES+=                bkgrndset1.chk
+FILES+=                bkgrndset2.chk
 FILES+=                blank.chk
 FILES+=                border_set1.chk
 FILES+=                border_set2.chk
diff -r 42e617d4ab86 -r 3cc22ce62671 tests/lib/libcurses/check_files/bkgrndset1.chk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libcurses/check_files/bkgrndset1.chk    Wed Apr 20 07:43:05 2022 +0000
@@ -0,0 +1,1 @@
+thissmsoArmsoissmsoArmsoasmsoArmsotestsmsoAAAAAAAAAAAAA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 No newline at end of file
diff -r 42e617d4ab86 -r 3cc22ce62671 tests/lib/libcurses/check_files/bkgrndset2.chk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libcurses/check_files/bkgrndset2.chk    Wed Apr 20 07:43:05 2022 +0000
@@ -0,0 +1,1 @@
+homesmsoAAAAAAAAAAAAAAhomermso
\ No newline at end of file
diff -r 42e617d4ab86 -r 3cc22ce62671 tests/lib/libcurses/t_curses.sh
--- a/tests/lib/libcurses/t_curses.sh   Wed Apr 20 07:41:04 2022 +0000
+++ b/tests/lib/libcurses/t_curses.sh   Wed Apr 20 07:43:05 2022 +0000
@@ -2011,6 +2011,16 @@
        h_run bkgdset
 }
 
+atf_test_case bkgrndset
+bkgrndset_head()
+{
+       atf_set "descr" "Validate curses sets the background character using a complex char on stdscr"
+}
+bkgrndset_body()
+{
+       h_run bkgrndset
+}
+
 atf_test_case getbkgd
 getbkgd_head()
 {
diff -r 42e617d4ab86 -r 3cc22ce62671 tests/lib/libcurses/tests/Makefile
--- a/tests/lib/libcurses/tests/Makefile        Wed Apr 20 07:41:04 2022 +0000
+++ b/tests/lib/libcurses/tests/Makefile        Wed Apr 20 07:43:05 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2021/02/13 06:29:45 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2022/04/20 07:43:05 blymn Exp $
 
 NOMAN=         # defined
 
@@ -24,6 +24,7 @@
 FILES+=                background
 FILES+=                beep
 FILES+=                bkgdset
+FILES+=                bkgrndset
 FILES+=                border_set
 FILES+=                box
 FILES+=                box_set
diff -r 42e617d4ab86 -r 3cc22ce62671 tests/lib/libcurses/tests/bkgrndset
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libcurses/tests/bkgrndset       Wed Apr 20 07:43:05 2022 +0000
@@ -0,0 +1,10 @@
+include start
+call OK addstr "this is a test"
+# background attributes set to standout and A for space
+cchar BKGND $STANDOUT "A"
+call OK bkgrndset $BKGND
+call OK refresh
+compare bkgrndset1.chk
+call OK erase
+call OK refresh
+compare bgkrndset2.chk



Home | Main Index | Thread Index | Old Index