summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/keyboard.c5
-rw-r--r--test/minibuffer.c4
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");