2023-08-19 19:56:36 +08:00
|
|
|
// Copyright 2021 Arthur Sonzogni. All rights reserved.
|
|
|
|
// Use of this source code is governed by the MIT license that can be found in
|
|
|
|
// the LICENSE file.
|
2021-06-18 05:07:26 +08:00
|
|
|
#include <vector>
|
2021-06-22 05:08:39 +08:00
|
|
|
#include "ftxui/component/terminal_input_parser.hpp"
|
2021-06-18 05:07:26 +08:00
|
|
|
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
|
|
|
|
using namespace ftxui;
|
2022-02-13 18:11:34 +08:00
|
|
|
auto event_receiver = MakeReceiver<Task>();
|
2021-06-18 05:07:26 +08:00
|
|
|
{
|
|
|
|
auto parser = TerminalInputParser(event_receiver->MakeSender());
|
|
|
|
for (size_t i = 0; i < size; ++i)
|
|
|
|
parser.Add(data[i]);
|
|
|
|
}
|
|
|
|
|
2022-02-13 18:11:34 +08:00
|
|
|
Task received;
|
2021-06-18 05:07:26 +08:00
|
|
|
while (event_receiver->Receive(&received))
|
|
|
|
;
|
|
|
|
return 0; // Non-zero return values are reserved for future use.
|
|
|
|
}
|