aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2026-01-06replace oversized libutf with smaller versionRandy Palamar3-8/+0
this is taken from one of my other projects. there was no reason for there to be 2x the code tests checking for surrogate characters and non characters were removed. I see no reason why the user shouldn't be allowed to insert those characters in text (they exist in the standard). Also, in the case of non-characters only the first two were being checked and not the other 64.
2026-01-06vis-marks: greatly simplify jumplist managementRandy Palamar1-7/+1
As far as I could tell from the code this was supposed to be a fixed size LRU cache of sets of selection regions. The structure had a maximum size member but it was never set or used. Furthermore there was some very complicated management of 2 parallel sets of regions. Instead of that mess just treat the cache as a circular buffer. Note that this is really not that useful at the moment. While the selection regions are saved and restored the editor mode is not. Therefore the selection is visible but not in any way usable. That will be fixed in the next commit.
2025-12-22move all standard library includes into util.hRandy Palamar4-24/+9
2025-12-16make vis a single file buildRandy Palamar3-6/+9
2025-12-16delete functions which were exposed as unusedRandy Palamar1-2/+1
2025-12-16mark all functions in headers with VIS_EXPORT or VIS_INTERNALRandy Palamar2-3/+4
if vis actually wants to be a library exported symbols may need mark up depending on the platform (eg. __declspec(dllexport)). This needs to be hidden behind a macro because the way you export is not the same on every platform. I did this based on the assumption that vis.h was supposed to be the only interface to the "vis" library. Since nobody actually uses vis as a library I have no idea if this is actually correct. Anyway marking up all prototypes like this allows for one to convert all functions to static if a single translation unit is used by inserting at the start: #define VIS_INTERNAL static #define VIS_EXPORT static
2025-12-08map: stop setting errno on errorRandy Palamar1-5/+4
the return of these functions already give all the necessary information. this is not c standard library code, we have no need of such a nonsensical error reporting mechanism NOTE: since errno needs to be thread local accessing it from non-libc code ends up being a function call and serves as a pointless optimization barrier.
2025-12-08util: replace memrchr with internal versionRandy Palamar2-7/+7
The amount of code we need to detect if this is present and handle the fallback is more than if we just provide it ourselves. Also we are passing in a difference of pointers so the argument type should be ptrdiff_t. This avoids a C brain damage of having unsigned size type which can wrap around if the caller is careful.
2025-12-02test: add gdb debugging support to lua testsMatěj Cepl1-8/+36
This commit refactors the lua test runner (`test.sh`) to support running a test inside `gdb` when the `-d` or `--debug` flag is passed.
2025-11-29Clarify testing infrastructure for vis editorJorge Gomez1-2/+1
Updated README to clarify repository purpose and structure.
2025-11-24text: remove a bunch of unused save functionsRandy Palamar1-5/+19
These functions were only used for testing the text system. One of them was moved to text-test.c to continue to facilitate this. Otherwise these functions are just cluttering up the code and making it hard to modify.
2025-02-28buffer: remove more unused exposed functionsRandy Palamar2-7/+5
NOTE: buffer-test.c now directly includes buffer.c so that it can continue to test functions which are defined as static/internal to buffer.c
2025-02-28buffer: remove buffer_printfRandy Palamar1-8/+0
There was only a single user of this function because buffer_appendf is significantly more useful. Change that caller and reduce the code.
2025-01-12test: add a couple missed files to .gitignoreRandy Palamar1-6/+9
2025-01-12buffer: drop buffer_move functionRandy Palamar1-6/+1
2025-01-12array: delete onelinersRandy Palamar1-32/+32
same as buffer commit Array is completely visible
2025-01-11buffer: clear out one line functionsRandy Palamar1-15/+15
Buffer is fully exposed to the program, no need to rely on the linker to optimize useless code.
2025-01-11buffer: delete pointless buffer_init functionRandy Palamar2-4/+2
lets not make the code harder to read for no reason
2025-01-04accommodate vis for changes with updates in the lexersMatěj Cepl1-1/+1
2025-01-02fix: correct URL of the Busted Lua unit testing framework.Matěj Cepl1-1/+3
2025-01-02no longer depend on lua-bustedJeremy Bobbin10-48/+135
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2024-09-13lua: add tests for the different vis.pipe argument variantsFlorian Fischer2-0/+87
2024-05-21Merge vis-tests into test directoryRandy Palamar454-0/+114700
Going forward all tests should be submitted here directly.
2024-05-21Prepare to merge vis-testRandy Palamar1-15/+0
2023-10-10ci: test: update submoduleRandy Palamar1-22/+13
Sourcehut recurses into submodules when cloning the repo for building so unlike github it uses the version of `test` that is checked into the repo. This is better behaviour but does mean that the submodule needs to be updated.
2023-05-23update test submoduleFelix Van der Jeugt1-5/+23
2021-01-25test: updateMarc André Tanner1-7/+5
2020-11-20test: updateMarc André Tanner1-7/+6
2020-10-30test: updateMarc André Tanner1-5/+8
2020-10-10test: updateMarc André Tanner1-9/+5
2020-09-20test: updateMarc André Tanner1-5/+9
2020-08-01test: updateMarc André Tanner1-13/+5
2020-07-17test: updateMarc André Tanner1-5/+13
2020-05-30test: updateMarc André Tanner1-5/+5
2020-05-13test: updateMarc André Tanner1-9/+5
2020-05-12test: updateMarc André Tanner1-11/+7
2020-02-25test: updateMarc André Tanner1-5/+13
2020-02-22test: updateMarc André Tanner1-5/+5
2020-02-20test: updateMarc André Tanner1-5/+5
2020-02-13test: updateMarc André Tanner1-9/+5
2018-05-30test: updateMarc André Tanner1-6/+8
2018-05-16test: upate to adapt to recent changesMarc André Tanner1-5/+7
2018-02-27vis: implement normal/outer paragraph text objectMarc André Tanner1-5/+5
2018-01-26test: updateMarc André Tanner1-5/+5
2017-07-14vis-lua: make selection first class primitives in Lua APIMarc André Tanner1-5/+5
2017-07-10test: updateMarc André Tanner1-5/+5
2017-07-08test: updateMarc André Tanner1-7/+5
2017-07-08vis: perform more renames cursor -> selectionMarc André Tanner1-5/+7
To fix compilation you need to update (or remove) config.h.
2017-06-19test: updateMarc André Tanner1-5/+5
2017-04-09vis: remove handling of \r\n line endingsMarc André Tanner1-8/+5
Use something like dos2unix(1) and unix2dos(1), if you need to edit such files.