Files
kte/TestFrontend.cc
Kyle Isom 2a6ff2a862 Introduce swap journaling crash recovery system with tests.
- Added detailed journaling system (`SwapManager`) for crash recovery, including edit recording and replay.
- Integrated recovery prompts for handling swap files during file open flows.
- Implemented swap file cleanup, checkpointing, and compaction mechanisms.
- Added extensive unit tests for swap-related behaviors such as recovery prompts, file pruning, and corruption handling.
- Updated CMake to include new test files.
2026-02-13 08:45:27 -08:00

38 lines
572 B
C++

#include "TestFrontend.h"
#include "Command.h"
#include "Editor.h"
bool
TestFrontend::Init(int &argc, char **argv, Editor &ed)
{
(void) argc;
(void) argv;
ed.SetDimensions(24, 80);
return true;
}
void
TestFrontend::Step(Editor &ed, bool &running)
{
// Allow deferred opens (including swap recovery prompts) to run.
ed.ProcessPendingOpens();
MappedInput mi;
if (input_.Poll(mi)) {
if (mi.hasCommand) {
Execute(ed, mi.id, mi.arg, mi.count);
}
}
if (ed.QuitRequested()) {
running = false;
}
renderer_.Draw(ed);
}
void
TestFrontend::Shutdown() {}