mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Don't forget to log output in lua expect()
This commit is contained in:
parent
0105346a11
commit
f1c5394570
1 changed files with 7 additions and 0 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
#include "xymodem.h"
|
#include "xymodem.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
#define MAX_BUFFER_SIZE 2000 // Maximum size of circular buffer
|
#define MAX_BUFFER_SIZE 2000 // Maximum size of circular buffer
|
||||||
|
|
||||||
|
|
@ -307,6 +308,12 @@ static int expect(lua_State *L)
|
||||||
{
|
{
|
||||||
putchar(c);
|
putchar(c);
|
||||||
expect_buffer_add(c);
|
expect_buffer_add(c);
|
||||||
|
|
||||||
|
if (option.log)
|
||||||
|
{
|
||||||
|
log_putc(c);
|
||||||
|
}
|
||||||
|
|
||||||
// Match against the entire buffer
|
// Match against the entire buffer
|
||||||
if (match_regex(®ex))
|
if (match_regex(®ex))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue