Commit Graph

3 Commits

Author SHA1 Message Date
Eric Roshan-Eisner
18595cad2e vi: simplify tests
I wrapped the repeated test infrastructure in a `vitest` function and inlined the dozens of tiny input files.

I shortened some of the test inputs to be clearer and discovered a couple bugs, left for now as commented out tests:
* `b` movement is off by one.
* Deleting/moving the last part of the last line of the file is off by one, usually leaving the final character in place.
2024-06-02 04:30:27 -05:00
Jarno Mäkipää
df19a448f6 vi: fix dw_last test, add more tests
Fixed delete last word test. (script should not have \n since it is
cursor down in vim)

Added tests to check inserts
Added tests to check yank and push
2020-02-02 09:32:01 -06:00
Jarno Mäkipää
a459a19c9c vi: Add tests
Test file integrity after load, move, delete and save+exit. Drawing
of buffer is not tested yet.

Added -s script option, accept file that is run as startup script of
commands. File is parsed byte at time and handled as you had typed it.
If EOF has been reached without editor close command, editing is
continued normally using keyboard. This functionality is in vim and
neovim, but not in POSIX vi standard. nvi (vi used in some macs) has
-s with different meaning...

Some simple tests added, dw last line test fails, so test is disabled.
2020-01-25 20:49:02 -06:00