Commit Graph

359 Commits (master)

Author SHA1 Message Date
nick black 21429dacc2
tester: add LoadBigSixel() from waveplate #2784 6 days ago
nick black 0f3a737a3c
tester: reject empty argument for -l 6 days ago
nick black 498777db4c
tester: fix handling of -l arg 6 days ago
Dan Bungert 8f972a3e0e metric: fix test on armhf/glibc 2.37
In the metric test is a call to ncnmetric, which eventually calls
snprintf.  Along the way is a size that is much larger than the actual
bufsize, but it shouldn't matter as the buffer size exceeds what we
print (or at least what is expected).

In testing with glibc 2.37 on armhf on Ubuntu Lunar, I found that these
metric tests can fail with some unexpected truncation of the values.

For example, in the following check,
```
    impericize_ncmetric(0, 1, buf, 0, 1000, '\0');
    CHECK(!strcmp("0.00", buf));
```
buf would actually be "0.0".

Using a more realistic buffer size produces a working result.
1 year ago
nick black 5c34ff4735 [tests] add FamilyAbove for infinite loop found by drewt #2687 2 years ago
nick black 7651cde998 workarounds for busted doctest 2.4.9 #2673 2 years ago
Tim Gates ab8590d7b3 docs: Fix a few typos
There are small typos in:
- src/demo/fission.c
- src/tests/wide.cpp

Fixes:
- Should read `obliterated` rather than `oblitrated`.
- Should read `range` rather than `reange`.
2 years ago
Nick Black ec1ef7200b use ffmpeg-free-compatible video in all tests #2631 2 years ago
nick black 8cd54b7932
[sixel] fix unit tests on big-endian machines 2 years ago
nick black 07b808588b simple ncvisual_from_sixel() unit test 2 years ago
nick black bec97315ad [tabs] autogrow to the right to next tabstop #1233 2 years ago
nick black 3681a95b3c [tabs] update plane+cell unit tests #1233 2 years ago
nick black 78cc44a1bf [tabs] get all unit tests working #1233 2 years ago
nick black 21f68bf57c [tabs] get PutcTaB unit test working #1233 2 years ago
nick black 7c8cf1e6e8 [ncplane_put] admit tab characters #1233 2 years ago
nick black b326d43885 [tabs] remove obsolete FIXME 2 years ago
nick black 25b94c021d more TaB unit tests #1233 2 years ago
nick black 6bf37089a1 add unit test for putchar on tab #1233 2 years ago
Alex Samuel ceb4a0e948 (Failing) test case for UNALIGNED puttext. 2 years ago
nick black 15e2c6eb12
[ncinput_equals] consider UNKNOWN == PRESS #2554 2 years ago
nick black 678273aaf5
[unittests] free up ncsixel_as_rgba() results 2 years ago
nick black c876ef18a5
[sixels] stretch in unit test to work on all geometries 2 years ago
nick black 03160d902d [termdesc] don't enable sixel graphics with 0 color registers 2 years ago
nick black dba86c72f0 [tests] is this just some ncdirect problem 2 years ago
nick black f2cca37c59
[tester] define loglevel so we can log in internal headers 3 years ago
nick black 3d0fbc4d8f ncvisual_from_sixel() atop ncsixel_as_rgba() 3 years ago
nick black bb91c170dd implement sixel_as_rgba() #1724 3 years ago
nick black 21dca60e7c [logging] use CRLF on windows #2489 3 years ago
nick black 094c8c00ca [channels_blend] update unit tests for general blender #2433 3 years ago
nick black 5f6f9ff75e [tests] cut line length down in textlayout test 3 years ago
nick black e49394a702
[output] partial print on right-aligned overflow text #2472 3 years ago
KristofferC a3c37932d6 check __MINGW32__ instead of __MINGW64__ 3 years ago
nick black b075de5da9
[channels_blend] blend palette-indexed colors #2442 3 years ago
nick black 49e9406576 [nctree] refuse the standard plane 3 years ago
nick black 8fe602e9ef [Nctree] adapt unit tests to newly-allowed empty trees #2458 3 years ago
nick black 52ac57cb49
[FutureFlags] don't overwhelm stdout in test 3 years ago
nick black 64c8776c48
[TextLayout] update unit test 3 years ago
nick black 0740f0286f
update LayoutZooText unit test 3 years ago
nick black adcdef6288 [ncplane_puttext] unit test for newline while growing plane #2446 3 years ago
nick black e57999d226 basic autogrow tests #2440 3 years ago
nick black c8e601e457 no autogrow for standard plane, add autogrow tests #2440 3 years ago
nick black 5eb23cefb0 [ncplane_put] subtle cursor verification fix
We were checking for an off-plane cursor destination on
the X axis when it was provided explicitly, but not when
-1 was used to indicate the current position (contradicting
the comment immediately above the test). We also want to do
so when we're using the current position, though in this
case scrolling must be taken into account. Also, we were
placing the cursor on such a validation failure, despite not
intending to write anything.

Not testing for a current x (the -1 case) usually worked
because it was thrown out by ncplane_move_cursor_yx() below.
That fails, however, when we're working with an EGC that's
more than one column.

Delicate!
3 years ago
nick black 91111cdb58
[ncchannels_reverse] don't generate illegal alpha+color states #2421 3 years ago
nick black 1c93a5ff45
[palette] rename unit tests, add some CHECKs 3 years ago
nick black 6080de837a [ncplane_putc_yx] copy egc to avoid invalidation
ncplane_putc_yx() calls ncplane_put() using an EGC extracted
from its nccell argument. The very act of writing that cell
to the plane, however, can grow the plane's underlying EGCpool,
possibly invalidating this reference. This was showing up as
a unit test failure on macOS, and was hopefully also the cause
of unit test failures on Alpine i686. Do a quick heap copy of
the EGC in ncplane_putc_yx(), and free it after writing to the
plane. Shouldn't cost anything (there was no measurable
impact in my testing). Closes #2420.
3 years ago
nick black 418aad1e45 reenable PlaneAtCursorInsane unit test on apple 3 years ago
nick black c49d3b1e02 enable RightToLeft test on apple 3 years ago
nick black 4513d36978 enable MultiglyphWidth test on apple 3 years ago
nick black a7db3b88fe
Use samoa.avi instead of fm6.mov in unit test
On DFSG builds, we don't have fm6.mov available to us,
so use samoa.avi (of my own construction) instead.
3 years ago
nick black 52c40cbca5
[notcurses.3] document all environment variables 3 years ago