Remove packaging.cmake, deprecate test_undo setup, and add new testing infrastructure.

- Delete `packaging.cmake` to streamline build system.
- Deprecate `test_undo` in CMake setup; condition builds on `BUILD_TESTS`.
- Introduce `TestFrontend`, `TestRenderer`, and `TestInputHandler` for structured testing.
- Update `GUIInputHandler` and `Command` for enhanced buffer save handling and overwrite confirmation.
- Enhance kill ring operations and new prompt workflows in `Editor`.
This commit is contained in:
2025-11-30 03:18:50 -08:00
parent 8c8e4e59a4
commit 091bfa8095
10 changed files with 266 additions and 131 deletions

35
TestRenderer.h Normal file
View File

@@ -0,0 +1,35 @@
/*
* TestRenderer.h - minimal renderer for testing (no actual display)
*/
#ifndef KTE_TEST_RENDERER_H
#define KTE_TEST_RENDERER_H
#include "Renderer.h"
#include <cstddef>
class TestRenderer : public Renderer {
public:
TestRenderer() = default;
~TestRenderer() override = default;
void Draw(Editor &ed) override;
std::size_t GetDrawCount() const
{
return draw_count_;
}
void ResetDrawCount()
{
draw_count_ = 0;
}
private:
std::size_t draw_count_ = 0;
};
#endif // KTE_TEST_RENDERER_H