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:
33
TestInputHandler.h
Normal file
33
TestInputHandler.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* TestInputHandler.h - programmable input handler for testing
|
||||
*/
|
||||
#ifndef KTE_TEST_INPUT_HANDLER_H
|
||||
#define KTE_TEST_INPUT_HANDLER_H
|
||||
|
||||
#include "InputHandler.h"
|
||||
#include <queue>
|
||||
|
||||
|
||||
class TestInputHandler : public InputHandler {
|
||||
public:
|
||||
TestInputHandler() = default;
|
||||
|
||||
~TestInputHandler() override = default;
|
||||
|
||||
bool Poll(MappedInput &out) override;
|
||||
|
||||
void QueueCommand(CommandId id, const std::string &arg = "", int count = 0);
|
||||
|
||||
void QueueText(const std::string &text);
|
||||
|
||||
|
||||
bool IsEmpty() const
|
||||
{
|
||||
return queue_.empty();
|
||||
}
|
||||
|
||||
private:
|
||||
std::queue<MappedInput> queue_;
|
||||
};
|
||||
|
||||
#endif // KTE_TEST_INPUT_HANDLER_H
|
||||
Reference in New Issue
Block a user