Commit 3f667ee
authored
refactor: migrate test suite to Neovim/Lua (#171)
* chore: migrate Ruby version management to mise
Replace .tool-versions with mise.toml, pinning to Ruby major version 4
to avoid unexpected breaking changes from future major version bumps.
* fix: remove pry and pry-byebug incompatible with Ruby 4
byebug's native extension fails to compile against Ruby 4's updated C
API. Neither gem is referenced in the test suite, so they are safe to
remove. Also regenerates Gemfile.lock with current compatible versions.
* docs: add local development setup instructions
Document the mise + bundle install workflow so contributors know how to
get a working local environment.
* ci: replace ruby/setup-ruby with jdx/mise-action
Use mise to install Ruby in CI, keeping the toolchain consistent with
local development. Removes the hardcoded ruby-version matrix — the
version is now sourced from mise.toml. Also bumps actions/checkout to
v6.0.2.
* feat: add Neovim/Plenary test infrastructure (PoC + first test)
Introduces a Lua-based test suite driven by Neovim headless mode and
Plenary.nvim, replacing the broken Vimrunner/MacVim client-server setup.
- test/minimal_init.lua: bootstraps Plenary from /tmp and loads the plugin
- test/helpers.lua: feedkeys, new_buffer, test_bullet_inserted utilities
- test/poc_spec.lua: infrastructure smoke tests
- test/bullets_spec.lua: first ported spec (basic bullet insertion)
- mise.toml: adds `mise run test` task; no Makefile needed
* test: migrate batch 1 specs to Lua/Plenary (wrapping, filetypes, asciidoc)
Key learnings captured in test infrastructure:
- feedkeys 'tx' exits insert mode; for non-bullet CR tests use two feedkeys
calls where the second prefixes 'i' to re-enter insert mode
- Non-bullet-line CR is deferred via feedkeys('n') by the plugin; the 'x'
flag drains it within the first call, leaving normal mode on the new line
- vim.wait() exits insert mode — do not use it between feedkeys calls
- startinsert! is not synchronous from Lua — cannot bridge feedkeys calls
- set formatoptions= + comments= in minimal_init and per-test to prevent
Neovim's '#' comment-continuation from corrupting test buffers
- nested dot bullet test (asciidoc) passes in Neovim — pending mark removed
* test: migrate batch 2 specs to Lua/Plenary (alphabetic, renumber, checkboxes)
Additional learnings added to minimal_init.lua:
- set noexpandtab globally to prevent user config leaking \t → spaces
- new_buffer() positions cursor at last line, so tests navigating from
line 1 must prefix 'gg' before their first motion
- expandtab contamination affects <C-t> indent tests; fixed globally
* test: migrate batch 3 specs to Lua/Plenary (bullets, nested_bullets)
Completes full test suite migration — all 63 tests passing.
Additional learnings:
- set expandtab=false + shiftwidth/tabstop=4 in before_each for indent tests
- visual mode selection is re-entered by plugin after </> ops; subsequent
operations stay in visual — no <Esc> needed between chained motions
- A<CR><CR> in one feedkeys call handles the empty-bullet deletion case
(both CRs fire while in insert mode, second deletes the empty bullet)
- .strip in Ruby tests hides trailing "- " (with space); Lua tests assert
the actual content including the trailing space
- mid-test config changes (e.g. g:bullets_enable_roman_list) work by setting
the global between separate feedkeys calls
* test: review and fix test accuracy
* chore(mise): add neovim
* ci: run lua tests in github actions
* chore: remove ruby tests
* chore: add dprint and formatting tasks
* refactor: format lua tests
* fix: include yaml in dprint
* fix(dprint): include all supported file types
* chore: format README
* chore: check formatting
* chore: add git hooks tooling1 parent c19ff40 commit 3f667ee
33 files changed
Lines changed: 1854 additions & 2355 deletions
File tree
- .github/workflows
- spec
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | | - | |
26 | | - | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | | - | |
29 | | - | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
| |||
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
348 | | - | |
| 350 | + | |
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
352 | | - | |
| 354 | + | |
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
356 | | - | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 362 | + | |
368 | 363 | | |
369 | 364 | | |
370 | | - | |
371 | | - | |
| 365 | + | |
372 | 366 | | |
373 | 367 | | |
374 | | - | |
375 | | - | |
| 368 | + | |
376 | 369 | | |
377 | 370 | | |
378 | 371 | | |
| |||
385 | 378 | | |
386 | 379 | | |
387 | 380 | | |
388 | | - | |
| 381 | + | |
389 | 382 | | |
390 | 383 | | |
391 | 384 | | |
392 | | - | |
| 385 | + | |
393 | 386 | | |
394 | 387 | | |
395 | 388 | | |
| |||
406 | 399 | | |
407 | 400 | | |
408 | 401 | | |
409 | | - | |
410 | | - | |
411 | | - | |
| 402 | + | |
412 | 403 | | |
413 | 404 | | |
414 | 405 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments