- 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`.
42 lines
652 B
C++
42 lines
652 B
C++
/*
|
|
* 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
|