diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-07-25 11:38:38 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-07-26 10:25:06 +0200 |
| commit | c0cab0f728db1f603cef01cf093e79c7259e80e4 (patch) | |
| tree | dde62b522b4202dca2c8b8b931bd0d34aea1426e /fuzz | |
| parent | 9cdb1656ee5b75350bb0114bab1ce212b2f65381 (diff) | |
| download | vis-c0cab0f728db1f603cef01cf093e79c7259e80e4.tar.gz vis-c0cab0f728db1f603cef01cf093e79c7259e80e4.tar.xz | |
test/fuzz: add @ dump command to print data structure
Diffstat (limited to 'fuzz')
| -rw-r--r-- | fuzz/text-fuzzer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fuzz/text-fuzzer.c b/fuzz/text-fuzzer.c index 559f90c..52dd31f 100644 --- a/fuzz/text-fuzzer.c +++ b/fuzz/text-fuzzer.c @@ -232,12 +232,20 @@ static enum CmdStatus cmd_info(Text *txt, const char *cmd) { return CMD_OK; } +static enum CmdStatus cmd_dump(Text *txt, const char *cmd) { +#ifdef text_dump + text_dump(txt, stdout); +#endif + return CMD_OK; +} + static enum CmdStatus cmd_quit(Text *txt, const char *cmd) { return CMD_QUIT; } static Cmd commands[] = { ['%'] = cmd_info, + ['@'] = cmd_dump, ['-'] = cmd_earlier, ['+'] = cmd_later, ['?'] = cmd_mark_get, |
