Integration tests for codediff.nvim using plenary.nvim.
C ↔ Lua boundary validation:
- Data structure conversion
- Memory management (no leaks)
- Edge cases (empty diffs, large files)
10 tests
Git operations and async handling:
- Repository detection
- Async callbacks
- Error handling for invalid revisions
- Path calculation
- LRU cache validation
9 tests
Automatic binary installation and version management:
- Module API validation
- VERSION loading from version.lua
- Library path construction
- Version detection from filenames
- Update necessity logic
- Platform-specific extension handling
10 tests
Diff view scrolling behavior:
- Scroll to first change
- Window centering
- Scroll sync activation
5 tests
LSP integration and rendering:
- Module compatibility checks
- Virtual file URL handling
- Namespace management
12 tests
./tests/run_plenary_tests.shnvim --headless --noplugin -u tests/init.lua \
-c "lua require('plenary.test_harness').test_directory('tests/ffi_integration_spec.lua')"Focus on integration points that C tests cannot validate:
- FFI boundary integrity
- Lua async operations
- System integration (git)
- UI behavior (scrolling, rendering)
Total: 46 tests across 5 spec files using industry-standard plenary.nvim framework.
❌ Diff algorithm - Validated by C tests in c-diff-core/tests/ (3,490 lines)
❌ Visual correctness - Manual testing required