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:
41
TestFrontend.h
Normal file
41
TestFrontend.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* TestFrontend.h - headless frontend for testing with programmable input
|
||||
*/
|
||||
#ifndef KTE_TEST_FRONTEND_H
|
||||
#define KTE_TEST_FRONTEND_H
|
||||
|
||||
#include "Frontend.h"
|
||||
#include "TestInputHandler.h"
|
||||
#include "TestRenderer.h"
|
||||
|
||||
|
||||
class TestFrontend final : public Frontend {
|
||||
public:
|
||||
TestFrontend() = default;
|
||||
|
||||
~TestFrontend() override = default;
|
||||
|
||||
bool Init(Editor &ed) override;
|
||||
|
||||
void Step(Editor &ed, bool &running) override;
|
||||
|
||||
void Shutdown() override;
|
||||
|
||||
|
||||
TestInputHandler &Input()
|
||||
{
|
||||
return input_;
|
||||
}
|
||||
|
||||
|
||||
TestRenderer &Renderer()
|
||||
{
|
||||
return renderer_;
|
||||
}
|
||||
|
||||
private:
|
||||
TestInputHandler input_{};
|
||||
TestRenderer renderer_{};
|
||||
};
|
||||
|
||||
#endif // KTE_TEST_FRONTEND_H
|
||||
Reference in New Issue
Block a user