diff options
| author | Albert Cervin <albert@acervin.com> | 2023-05-11 22:09:49 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-05-11 22:09:49 +0200 |
| commit | ea849862a85e1751206c20254e9126cf3e8096b5 (patch) | |
| tree | 249bbd4630a156983ea77bc4d43c186e03f6ed0e /test | |
| parent | 67276833f9ede96dbc549c508f182c913240ac2c (diff) | |
| download | dged-ea849862a85e1751206c20254e9126cf3e8096b5.tar.gz dged-ea849862a85e1751206c20254e9126cf3e8096b5.tar.xz dged-ea849862a85e1751206c20254e9126cf3e8096b5.zip | |
Fix languages
- Enumerate windows on screen.
- Build with optimizations.
Diffstat (limited to 'test')
| -rw-r--r-- | test/keyboard.c | 5 | ||||
| -rw-r--r-- | test/minibuffer.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/test/keyboard.c b/test/keyboard.c index 1ddbba5..64419ec 100644 --- a/test/keyboard.c +++ b/test/keyboard.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -60,7 +61,9 @@ struct fake_keyboard create_fake_keyboard(struct fake_reactor_impl *reactor) { } void fake_keyboard_write(struct fake_keyboard *kbd, const char *s) { - write(kbd->writefd, s, strlen(s)); + if (write(kbd->writefd, s, strlen(s)) < 0) { + printf("write to kbd fd failed: %s\n", strerror(errno)); + } } void fake_keyboard_close_write(struct fake_keyboard *kbd) { diff --git a/test/minibuffer.c b/test/minibuffer.c index a6c7f96..5c5ae63 100644 --- a/test/minibuffer.c +++ b/test/minibuffer.c @@ -50,13 +50,13 @@ void test_minibuffer_echo() { ASSERT(minibuffer_displaying(), "Minibuffer should now have text to display"); minibuffer_clear(); - buffer_update(&view, 100, 1, list, 0, &relline, &relcol); + buffer_update(&view, -1, 100, 1, list, 0, &relline, &relcol); ASSERT(!minibuffer_displaying(), "Minibuffer should have nothing to display after clearing"); minibuffer_echo_timeout(0, "You will not see me"); - buffer_update(&view, 100, 1, list, 0, &relline, &relcol); + buffer_update(&view, -1, 100, 1, list, 0, &relline, &relcol); ASSERT(!minibuffer_displaying(), "A zero timeout echo should be cleared after first update"); |
