Commit Graph

228 Commits

Author SHA1 Message Date
nick black
a22414cd35 explicitly disable italics on ncv failure #1525 2021-05-26 18:04:29 -04:00
nick black
c4e2932c76 add ncdirect_supported_styles(), move SGR/SGR0/OC into escblock #1525 2021-05-26 18:04:29 -04:00
nick black
1207765cc8 op/fgop/bgop into escape block #1525 2021-05-26 18:04:29 -04:00
nick black
f344c0d978
strengthen ImageChildScaling test #1675 2021-05-22 20:49:35 -04:00
nick black
b26730a7e0
ensure we're exercising renderer in visual unit tests 2021-05-22 18:22:22 -04:00
nick black
41a31b0352
predicate ImageFileChildScaling unit test on ability to open media #1675 2021-05-22 18:13:56 -04:00
nick black
20ea3a3345
new unit test, ImageFileChildScaling #1675 2021-05-22 17:27:42 -04:00
nick black
a0bf28645f unit test for visuals with partial limit + offset #1661 2021-05-20 00:54:52 -04:00
nick black
69adacf3f5 add Visual::Partial unit test for #1661 2021-05-20 00:54:52 -04:00
nick black
0b197fe19b is_test_tty: check for /dev/tty #1668 2021-05-17 19:16:52 -04:00
nick black
a7fe43654b wrap cursor tests in is_test_tty() #1668 2021-05-17 19:16:52 -04:00
nick black
6d1b7e7571 add is_test_tty() for notcurses-tester 2021-05-17 19:16:52 -04:00
nick black
c49749a1bd
add unit tests to check cursor following render #1664 2021-05-16 18:28:06 -04:00
nick black
8df01c2ab8
beef up directmode directf tests #1664 2021-05-16 18:24:15 -04:00
nick black
8729eccf06
SprixelGeom test: validate that scale{x,y} == cdim{x,y} #1659 2021-05-16 14:04:40 -04:00
nick black
2ef759f7a9
correct ncvisual_blitset_geom() for ncdirect case #1659 2021-05-16 14:01:07 -04:00
nick black
94cd3b60f1 basic unit testing of ncdirectf_geom() #1659 2021-05-16 12:58:24 -04:00
nick black
445ead70da basic unit testing of ncdirectf_geom() #1659 2021-05-16 12:58:24 -04:00
nick black
3ae7ed6ed3 fix bitmapmaximize unit test to not use standard plane #1658 2021-05-16 08:14:59 -04:00
nick black
39afbd75c4 bitmap tests: remove useless garbage 2021-05-16 08:14:59 -04:00
nick black
b9e941e51e tester: interpret any -l as -l8 2021-05-16 08:14:59 -04:00
nick black
194c739038 add new unit test SprixelMaximize #1658 2021-05-16 08:14:59 -04:00
nick black
ee638b9a96
nccell_width() return -1 on utf8_egc_len() error #1627 2021-05-08 18:05:31 -04:00
nick black
2d7019c726
deal with possible endianness problems in bitmap tests #1627 2021-05-06 10:10:03 -04:00
nick black
6a2ed461df
deal with possible endianness problems in bitmap tests #1627 2021-05-06 10:09:20 -04:00
nick black
578f8eb45c bitmaps: cap to screen size, fix bitmap childplane tests #1603 2021-05-04 19:08:55 -04:00
nick black
e8f0ff0f30 NCVISUAL_OPTION_CHILDPLANE unit tests for bitmap path #1603 2021-05-04 19:08:55 -04:00
nick black
763a69ea41 unit tests for NCVISUAL_OPTION_CHILDPLANE #1603 2021-05-04 19:08:55 -04:00
nick black
2e444a7a23 bitmap unit tests: adapt to proper sixel scaling #1560 2021-05-02 20:20:05 -04:00
nick black
16d54497fa bitmap unit tests: exercise resize to 1,1 #1594 2021-05-02 20:20:05 -04:00
nick black
1242e06d23
fd tests: don't introduce c++ locks #1538 2021-05-01 22:20:58 -04:00
nick black
1218fbddf9
fd tests: move inline_cancelled out of file scope 2021-05-01 22:11:09 -04:00
nick black
5b926d311c
egcpool unit tests: use nccell_width() throughout 2021-05-01 20:12:50 -04:00
nick black
8e0173cce3
cell unit tests: use nccell_width() 2021-05-01 20:04:46 -04:00
nick black
1f55d2e398
exception tests: explicitly stop context 2021-05-01 17:32:24 -04:00
nick black
476d180797
sixel tests: notcurses_stop() on early exit 2021-05-01 17:28:19 -04:00
nick black
a6766c3bd4 [sixel] use transparency vector + auxvecs #1440 2021-04-29 07:47:42 -04:00
nick black
505571e43f [sixel] implement wipe_color #1440 2021-04-29 07:47:42 -04:00
nick black
3eb004b61d s/channels/ncchannels/g #1570 2021-04-29 01:32:08 -04:00
nick black
e43a9955cd
channel_* functions -> ncchannel_* #1570 2021-04-27 14:10:41 -04:00
nick black
7bb23a994b update cell unit tests for freebsd 13 2021-04-26 07:37:03 -03:00
nick black
b3b47cd81f don't mix c and c++-style initializers 2021-04-26 07:36:52 -03:00
nick black
41c5df3336 kitty: set up auxiliary vector #1440 2021-04-26 02:43:48 -04:00
nick black
dd85c7042b add auxiliary vector to TAM #1440 2021-04-26 02:43:48 -04:00
Nick Black
6f07ecb556 bitmap unit tests: use SCALE to work ona ll geoms 2021-04-25 16:10:11 -04:00
nick black
e9ef4d50f4 break up opaque/mixed into sixel and kitty states 2021-04-25 04:57:27 -04:00
Nick Black
2c5d938cbd
Paint sprixels bottom-to-top (#1589)
* Paint sprixels in order, bottom-to-top

We don't want to have to track sprixel order whenever someone
moves an ncplane, so just keep a list growing backwards as we
pass top-to-bottom in notcurses_render_internal(). Each time
we hit a sprixel plane, splice it out of the sprixel list, and
add it to the front of our temporary list. When we hit the
bottom, stick this temporary list on the end of our existing
list (any such planes are to be deleted, which comes before
drawing). Closes #1575.

* reorder collected sprixellist; solves kitty but breaks sixel =/ #1575

* remove debugging cruft

* [rust] fix up mergedown mutability
2021-04-24 13:08:09 -04:00
nick black
0c2749707c
sprixel stacking unit test #1575 2021-04-24 10:10:20 -04:00
nick black
e29701cac3
notcurses-tester: accept -l to enable all logging 2021-04-24 05:18:04 -04:00
nick black
dc87bd7c79
ncvisual_blitset_geom: no pixel size checks for scale/stretch #1572 2021-04-24 05:16:18 -04:00
nick black
95072d0f5c
No glyph emission on sprixelated planes
Guard against attempts to output glyphs to a sprixelated
plane in ncplane_putc_yx(), the lowest-level common end
of all ncplane_put*() functions. Add unit test #1572.
2021-04-24 04:47:05 -04:00
nick black
5a72383cb0
reject sprixels larger than plane, add unit test #1572 2021-04-24 04:41:23 -04:00
Nick Black
ba6088578d
Sixel unit tests #1580 (#1586)
Two unit tests on Sixel round trips, one with wipes #1580.
2021-04-24 01:51:26 -04:00
nick black
6dcb3229e4
unit test for sixel deepclean #1580 2021-04-22 19:54:24 -04:00
Nick Black
c8680255be
palette256 -> ncpalette #1570 (#1573)
everything prefixed with palette256 is now prefixed with ncpalette
2021-04-22 04:11:06 -04:00
nick black
31dfa86725
clamp Sixel at a multiple of 6 #1560 2021-04-19 21:47:38 -04:00
nick black
c3c5b397a3
run ncvisual_resize() in bitmap tests #1559 2021-04-18 12:12:27 -04:00
nick black
67bac13f67
kill off-by-one in pixel scaling #1558 2021-04-18 10:37:28 -04:00
nick black
f19c6c88ff
add BitmapStretch unit test #1558 2021-04-18 10:37:28 -04:00
nick black
7d61457b37
ncvisual_inflate: call ncvisual_seed_details() #1546 2021-04-18 06:52:21 -04:00
nick black
1722714ee6 tighten up visual unit tests 2021-04-18 01:12:28 -04:00
nick black
2ebe209c7f implement ncvisual_inflate(), add unit test #1546 2021-04-18 01:12:28 -04:00
nick black
5a702512c5 [bitmaps] be less aggressive about third phase
When we scribble underneath a TRANSPARENT or ANNIHILATED
sprixcell, or even an OPAQUE or MIXED one in Kitty, we
needn't invalidate the sprixel. Perform these checks for
less aggressive invalidation, eliminating the flicker we
were seeing in xray using Kitty. Closes #1522.
2021-04-16 07:23:26 -04:00
nick black
b070b69eb2
get last remaining cell_ functions -> nccell_ #1532 2021-04-15 22:29:53 -04:00
nick black
7ad5219fa2
convert another crop of cell_ to nccell_ #1532 2021-04-15 22:20:16 -04:00
nick black
76bcb8f0af
zaxis test: update to api3 2021-04-14 09:36:00 -04:00
nick black
96ac640733
cell->nccell 2021-04-14 09:31:50 -04:00
nick black
657ed15632
cell_on_styles -> nccell_on_styles() #1532 2021-04-14 09:05:00 -04:00
Nick Black
e591ec2e98
cell -> nccell throughout much of remaining API (#1535)
cell -> nccell throughout much of the API #1532
2021-04-14 06:42:14 -04:00
nick black
0c566cd74a [ncvisual] pipe transcolor through #1518 2021-04-10 12:02:58 -04:00
nick black
ff76dba6ed
cell_strdup -> nccell_strdup 2021-04-10 09:21:52 -04:00
nick black
d504e972cc
cell_release -> nccell_release 2021-04-10 09:09:56 -04:00
nick black
1f67f540e6
[stacking] guard tests for quadrants 2021-04-10 06:58:08 -04:00
nick black
1720457467
[rotate] fix unit tests for odd number of columns 2021-04-10 06:52:39 -04:00
nick black
17a27427ec
[visual] guard quadblitter tests with check 2021-04-10 06:37:05 -04:00
nick black
80d93fdfb6
disable quadrants except where whitelisted #1517
Require a known-good TERM heuristic match to enable
quadrants (NCBLIT_2x2); they otherwise decay to halves
(NCBLIT_2x1). The only terminal that supports quadrants
but does not support sextants is the Linux console, where
we program quadrants directly into the font table,
like a beast. Closes #1517, and #1298 if we're lucky.
2021-04-10 05:12:45 -04:00
Nick Black
04b1ba8ed2
Dankamongmen/unify geom (#1514)
deprecate ncvisual_geom() in favor of new ncvisual_blitter_geom(), which allows caller to get the blitter used. replace the checks and calculations in ncvisual_render() with a call to ncvisual_blitter_geom(), unifying the two paths (and eliminating several bugs in the unloved ncvisual_geom()).
2021-04-10 04:04:02 -04:00
nick black
d153ccb8f4
[ncvisual] properly size created plane
if we go into ncvisual_render() looking to render a number
of rows not evenly divisible by the scaling factor, we need
to get an extra row (duh). correct ncvisual_render_cell() to
reflect this. the blitters already know to fill this line in
with transparency wherever the image is not defined. fix up
rotation unit tests to reflect this. closes #1513.
2021-04-09 23:27:06 -04:00
nick black
05082fc277
ncplane_as_rgba(), returns pixel geometry along with bitmap #1508 2021-04-08 04:12:11 -04:00
nick black
8db054ede7
kill off get_controlling_tty in favor of get_tty_fd #1504 2021-04-04 16:42:19 -04:00
nick black
2f47d9adef
[bitmaps] new unit test LoadVideoPixelScaleDifferentPlanes 2021-04-04 04:16:55 -04:00
nick black
d4883d30f2
[tests] add directmode bitmap test 2021-04-01 18:23:01 -04:00
nick black
dd6d9392ec
[unittests] add PixelTAMSetup test #1445 2021-03-31 02:08:04 -04:00
nick black
259c5f5e3e
[tests] pixel test shouldn't check for wipe function 2021-03-31 02:01:39 -04:00
nick black
cef16e77ce
disable PixelWipe test until we can keep it from OOMing ctest 2021-03-30 17:08:30 -04:00
nick black
913f06d59c
[PixelWipeImages] actually test image wiping 2021-03-28 19:47:27 -04:00
nick black
0434d75689
[unittests] correct checks for putchar 2021-03-28 19:42:47 -04:00
nick black
c67981d668
[unittests] don't export sprite_wipe_cell() 2021-03-28 19:15:26 -04:00
nick black
57114c8005
[bitmaps] remove redundant PixelWipeBlocks test 2021-03-28 16:59:02 -04:00
nick black
85d0df491e
[bitmap] intensify unit tests 2021-03-27 17:28:22 -04:00
nick black
78c8e70933 [planes] add NCPLANE_OPTION_MARGINALIZED #1472 2021-03-27 07:07:48 -04:00
nick black
a3a4f40fa0 [bitmaps] add a big unit test on wiping 2021-03-27 07:07:48 -04:00
nick black
cd297ff4d2 [tests] add pixel video test, direct mode scale test 2021-03-25 20:41:02 -04:00
nick black
6f4a9e089c [tests] unit test for directmode image rendering 2021-03-25 20:41:02 -04:00
nick black
828cce634a [capabilites] remove redundant notcurses_canpixel() 2021-03-25 20:41:02 -04:00
nick black
32def3a600
[nctabbed] notcurses_stop() ending unit tests 2021-03-25 16:42:43 -04:00
nick black
978d872307
[nctabbed] get Add test working 2021-03-25 16:29:23 -04:00
MasFlam
c677a4fd8a
Add the nctabbed widget (#1431)
Tabs for the people!

fixes #986
2021-03-24 17:27:29 -04:00
nick black
ddac4706d8 [visual-tests] update media reference 2021-03-24 05:22:15 -04:00
nick black
92b2165b39
use fputs_unlocked() everywhere we can 2021-03-20 17:55:37 -04:00
nick black
3a3baae753 new unit test PixelCellWipePolychromatic 2021-03-20 12:26:41 -04:00
nick black
11108e4d95 [kitty] kitty_cell_wipe() now works perfectly 2021-03-20 10:59:33 -04:00
nick black
07594606fd [kitty] finish sprite_kitty_cell_wipe 2021-03-20 10:59:33 -04:00
nick black
c067c2bfd9 [kitty] further work on kitty_cell_wipe() 2021-03-20 10:59:33 -04:00
nick black
fc4c0a2d9c [kitty] most of sprite_kitty_cell_wipe() 2021-03-20 10:59:33 -04:00
nick black
9270a58b2d [pixel] unit test on sprixel_cell_wipe() 2021-03-20 10:59:33 -04:00
nick black
6ab325a36e [tinfo] zero out sixel_maxx/sixel_maxy 2021-03-20 10:59:33 -04:00
nick black
232e774c61 notcurses-tester: don't set LOGLEVEL_ERROR
this ends up just confusing people more often than it
gets us useful bug reports. indeed, one distribution
disabled our tests because "it says it can't run without
a real tty".
2021-03-16 00:32:45 -04:00
nick black
b2ef9a074b add simple pixel-rendering unit test 2021-03-16 00:32:45 -04:00
nick black
08b65a8699 sprixels: introduce sprixel cache #1401 2021-03-16 00:32:45 -04:00
nick black
9b15854ef4 direct mode unit test fix for sgr0 #1344 2021-03-15 02:42:24 -04:00
nick black
a8aec8d8d1 directmode tests: handle non-sgr case #1344 2021-03-15 02:18:07 -04:00
nick black
d8d8251a0e
notcurses-tester: enforce minimum geometry 2021-03-14 03:32:17 -04:00
nick black
aa4da3f335
nctree: drop bchannels from options 2021-02-24 23:33:53 -05:00
Nick Black
e30b12a480
nctree (#1361)
The nctree widget, PoC, and unitt rs #1164.
2021-02-23 14:38:06 -05:00
nick black
c014a2d55e
quadblitter: minimize total rgb distance
Previously, the quadblitter compared the external two pixels
against the two lerps, and if the closest was closer to the
primary lerp than the secondary, trilerped the closest with
the primary pair. Instead, calculate the total RGB distance,
and for whichever external pixel is closer to the primary
lerp, calculate the trilerp and the new candidate difference.
if the candidate difference is less than the total distance,
select it and perform the trilerp. This improves upon the
"twinkling problem" described in #1354, though it does not
entirely resolve it. Performance change is negligible. Add a
unit test for this change.
2021-02-21 11:34:06 -05:00
nick black
2741b049cb
don't expose nctree in 2.2.2 2021-02-18 07:04:03 -05:00
nick black
528c7f589f nctree: traversal unit tests #1644 2021-02-15 13:23:41 -05:00
nick black
ad7936ccc3 nctree_prev(): implement it #1164 2021-02-15 13:23:41 -05:00
nick black
74079c4b65 nctree: test nctree_focused() #1164 2021-02-15 13:23:41 -05:00
nick black
3aa4311559 nctree: test NULL callback case for real #1164 2021-02-15 13:23:41 -05:00
nick black
85e3e1d79a implement nctree_offer_input() 2021-02-15 13:23:41 -05:00
nick black
41d056b8d6 nctree tests: render planes #1164 2021-02-15 13:23:41 -05:00
nick black
bb14694000 add nctree movement api #1164 2021-02-15 13:23:41 -05:00
nick black
8de0453148 initial nctree unit tests #1164 2021-02-15 13:23:41 -05:00
nick black
1b1e0b88be
ncplane_qrcode: drop blitter argument, update docs 2021-02-15 03:34:14 -05:00
nick black
97a92cbbd7
notcurses-tester: always reset terminal on exit 2021-02-11 15:46:28 -05:00
nick black
38e9051888
move tests to src/tests 2021-02-07 20:52:20 -05:00