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