Commit Graph

621 Commits

Author SHA1 Message Date
70344a7324 Add test suite for sunny day scenarios
We add, mend, and remove every design in our official config file
and check that the operation is successful.
2023-12-24 14:11:40 +01:00
62f8587a28 Add ANSI box options to default config 2023-12-24 14:06:50 +01:00
0d4f49f0fb Add default padding to some box designs 2023-12-24 14:06:49 +01:00
30950e7f72 Refactor is_blankward() in shape.c 2023-12-09 14:54:14 +01:00
0eed7422f6 Restore indentation mode on box removal 2023-12-09 14:54:14 +01:00
f739343c29 Move some declarations from shape.h to boxes.in.h
This resolves some otherwise circular dependencies between modules.
2023-12-09 14:54:13 +01:00
76c4e10cd1 Add new test case for nearly blank corners and indentation removal
... including some fixes to make this work.
2023-12-09 14:54:13 +01:00
c146373601 Update .gitignore with cmake build artifacts 2023-12-09 14:54:12 +01:00
02610f4613 Free some unused memory in 'cmdline' module 2023-12-09 14:53:13 +01:00
94de53c6f0 Do not use ncurses on Windows
Instead, we just assume that on Windows, we always have color-capable terminals.
2023-12-09 14:51:25 +01:00
ba40638946 Add two more black-box tests for removal with fixes 2023-12-09 14:51:23 +01:00
602d91dd8b Test and fix handling of line comment removal 2023-12-09 14:48:47 +01:00
d9550ac58d Add new box designs 'info', 'warning', and 'critical'
which take advantage of coloring and unicode
2023-12-09 14:48:47 +01:00
863c7c1f7b Test and fix more comparison types in box removal 2023-12-02 22:26:36 +01:00
2a2111cfae Remove unused code from 'shape' module 2023-12-02 22:26:36 +01:00
505b10b98f Remove unused code from 'tools' module 2023-12-02 22:26:35 +01:00
393f27256e Remove obsolete parameter 'skip' from u32_strnrstr() in 'unicode' module 2023-12-02 22:26:35 +01:00
a11c6cdb51 Remove advance32() from 'unicode' module
This function was made redundant by the 'bxstring' module.
2023-12-02 22:26:35 +01:00
9279541714 Remove old implementation of 'remove' module 2023-12-02 22:26:35 +01:00
6de060ceb6 Finalize rewritten 'remove' module 2023-12-02 22:26:34 +01:00
775cabfbf6 Add bxs_substr() and bxs_prepend_spaces() to 'bxstring' module 2023-12-02 22:26:34 +01:00
770838b273 Beautify west shape formatting in 'diamonds' design 2023-12-02 22:26:34 +01:00
f4e6652c9e Adjust vscode config 2023-12-02 22:26:34 +01:00
eca7287f0c Extract match_horiz_line() function in 'remove' module 2023-12-02 22:26:34 +01:00
cde5ecc26a Extract match_outer_shape() function in 'remove' module 2023-12-02 22:26:31 +01:00
c4982a15df Add bxs_last_char_ptr() in bxstring module 2023-12-02 22:25:18 +01:00
6ce0f86898 Rename s1 and s2 parameters of u32_strnrstr to haystack and needle in unicode module 2023-12-02 22:25:18 +01:00
f30f12a988 Add south_side_rev to shape module 2023-12-02 22:25:18 +01:00
ead517a4d7 Fix problems found by unit tests and compiler
These had been caused by the reimplementation of a module.
2023-12-02 22:25:18 +01:00
4175d72bc8 Rewrite 'remove' module to enable unicode, double-with chars, and coloring 2023-12-02 22:25:17 +01:00
9511d18bc1 Add bxs_ltrim() to bxstring module 2023-12-02 22:25:17 +01:00
e2d5eab97b Add BMIN macro to tools.h 2023-12-02 22:25:17 +01:00
aef8c56eed Add u32_insert_space_at() to 'unicode' module 2023-12-02 22:25:17 +01:00
6c40928ed0 Add u32_is_blank() in 'unicode' module 2023-12-02 22:25:16 +01:00
1b71c4fca2 Extract some common code in 'detect' module 2023-12-02 22:25:16 +01:00
47c32efa5f Extract a new module 'detect' from 'remove' module
This is the "design autodetect" functionality.
2023-12-02 22:25:16 +01:00
a759026790 Switch input structure entirely to bxstring 2023-12-02 22:25:12 +01:00
45ce5e6762 Add more box removal test cases 2023-12-02 22:23:43 +01:00
15c72d4d99 Restore branch coverage for tests on Linux 2023-12-02 14:36:19 +01:00
1cbd1f933c Change Makefile so that 'clean' spares the vendor/ folder
Run 'make cleanall' to remove it as well
2023-12-02 14:02:08 +01:00
b91dfd5dff Fix some problems with LEX and YACC defaults on Linux
Remove flags_darwin, which are the same as flags_unix now
2023-12-02 13:51:55 +01:00
80880a3ad7 Removed linker --wrap option so unit tests run on macOS 2023-12-02 13:51:55 +01:00
2c904da505 use defines 2023-12-02 13:51:55 +01:00
d2c44c04e0 Update function name to be wrapped in unit testing Makefile 2023-12-02 13:51:55 +01:00
03c79973f0 Remove ignore errors 2023-12-02 13:51:55 +01:00
cc6b3502af Add flex and bison to env 2023-12-02 13:51:55 +01:00
ed19a57c59 Enable white-box tests on macOS 2023-12-02 13:51:55 +01:00
71331ee205 tools.h - change set_bx_fprintf() function declaration to match renamed parameter 2023-12-02 13:51:55 +01:00
5f0db01418 Update Makefile, src/Makefile, and utest/Makefile to support MacOS unit tests 2023-12-02 13:51:55 +01:00
503a81cf9a setup_mocks() should set function pointer bx_fprintf to point to __wrap_bx_fprintf() 2023-12-02 13:51:55 +01:00