summaryrefslogtreecommitdiff
path: root/test/keyboard.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-05-11 22:09:49 +0200
committerAlbert Cervin <albert@acervin.com>2023-05-11 22:09:49 +0200
commitea849862a85e1751206c20254e9126cf3e8096b5 (patch)
tree249bbd4630a156983ea77bc4d43c186e03f6ed0e /test/keyboard.c
parent67276833f9ede96dbc549c508f182c913240ac2c (diff)
downloaddged-ea849862a85e1751206c20254e9126cf3e8096b5.tar.gz
dged-ea849862a85e1751206c20254e9126cf3e8096b5.tar.xz
dged-ea849862a85e1751206c20254e9126cf3e8096b5.zip
Fix languages
- Enumerate windows on screen. - Build with optimizations.
Diffstat (limited to 'test/keyboard.c')
-rw-r--r--test/keyboard.c5
1 files changed, 4 insertions, 1 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) {