Add test for Git editor swap cleanup and improve swap file handling

- Added `test_swap_git_editor.cc` to verify proper swap file cleanup during Git editor workflows. Ensures no stale swap files are left after editor closure.
- Updated swap handling logic in `Editor.cc` to always remove swap files on buffer closure during normal exit, preventing accumulation of leftover files.
- Bumped version to 1.6.5 in `CMakeLists.txt`.
This commit is contained in:
2026-02-17 13:10:01 -08:00
parent 199d7a20f7
commit 95a588b0df
3 changed files with 100 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ project(kte)
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 20)
set(KTE_VERSION "1.6.4")
set(KTE_VERSION "1.6.5")
# Default to terminal-only build to avoid SDL/OpenGL dependency by default.
# Enable with -DBUILD_GUI=ON when SDL2/OpenGL/Freetype are available.
@@ -310,6 +310,7 @@ if (BUILD_TESTS)
tests/test_swap_replay.cc
tests/test_swap_recovery_prompt.cc
tests/test_swap_cleanup.cc
tests/test_swap_git_editor.cc
tests/test_piece_table.cc
tests/test_search.cc
tests/test_search_replace_flow.cc