tests: add prof_send_raw
Allow sending byte sequences to the Profanity PTY without a newline. Now we can simulate control characters, specifically the `TAB` key (`\t`), to trigger autocompletion.
This commit is contained in:
@@ -397,6 +397,14 @@ prof_input(const char* input)
|
||||
usleep(1000 * 100); // 100ms delay
|
||||
}
|
||||
|
||||
void
|
||||
prof_send_raw(const char* bytes)
|
||||
{
|
||||
write(fd, bytes, strlen(bytes));
|
||||
tcdrain(fd);
|
||||
usleep(1000 * 100);
|
||||
}
|
||||
|
||||
int
|
||||
prof_output_exact(const char* text)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ void prof_start(void);
|
||||
void prof_connect(void);
|
||||
void prof_connect_with_roster(const char* roster);
|
||||
void prof_input(const char* input);
|
||||
void prof_send_raw(const char* bytes);
|
||||
|
||||
int prof_output_exact(const char* text);
|
||||
int prof_output_regex(const char* text);
|
||||
|
||||
Reference in New Issue
Block a user