Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   rillig
Date:           Sun Feb  7 01:53:54 UTC 2021

Modified Files:
        src/distrib/sets/lists/tests: mi
        src/tests/lib/libcurses/check_files: Makefile addch.chk addstr.chk
        src/tests/lib/libcurses/tests: addch addnstr addstr waddnstr waddstr
Added Files:
        src/tests/lib/libcurses/check_files: addnstr.chk waddstr.chk

Log Message:
libcurses: demonstrate bug in addch that doubles tab indentation

When adding "\t" via addch, win.curx advances by twice the spaces as
intended.  This bug was introduced somewhere between NetBSD 8.0 and 9.0.

Adding "\t" via addstr does not have this bug.

This bug causes the installation menu of sysinst to be have its menu
items indented by 16 characters instead of only 8.  This in turn
produces an ugly line break in the German translation.

The test framework for libcurses is not well integrated into ATF.
Whenever the expected output is longer than the actual output, or vice
versa, the test passes nevertheless.  This makes it necessary to
constantly look into atf-run.log to see whether the actual output is
indeed equal to the expected output, which is crucial, especially for
telling the difference between addstr and addnstr.

Reusing the .chk files for several tests is not a good idea either.  For
example, addstr and waddstr are supposed to produce the same result for
ASCII-only text, so it was tempting to use the same file.  But waddstr
seems to have a bug (maybe undefined behavior), at least waddstr returns
ERR in one case where it shouldn't.  This means that currently the
expected output (acknowledging the bug) must be different.

The "expected" test output in waddstr.chk looks completely broken, but
that's exactly what the test produces right now.


To generate a diff of this commit:
cvs rdiff -u -r1.1015 -r1.1016 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libcurses/check_files/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/addch.chk
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/check_files/addnstr.chk \
    src/tests/lib/libcurses/check_files/waddstr.chk
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/check_files/addstr.chk
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/tests/addch \
    src/tests/lib/libcurses/tests/addnstr
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libcurses/tests/addstr \
    src/tests/lib/libcurses/tests/waddnstr \
    src/tests/lib/libcurses/tests/waddstr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index