summaryrefslogtreecommitdiff
path: root/tests/test_fgets.c
diff options
context:
space:
mode:
authorjvoisin2023-06-23 00:28:01 +0200
committerjvoisin2023-06-23 00:28:01 +0200
commit5827cef597d2b9b87b950c9b50023d11b1363c04 (patch)
treee3797ed1feedda57bc15e8aac39c1cae43759025 /tests/test_fgets.c
parent44a71e36ed37781fa850662f479734cce1c354ce (diff)
Add a test for fgets
Diffstat (limited to 'tests/test_fgets.c')
-rw-r--r--tests/test_fgets.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_fgets.c b/tests/test_fgets.c
new file mode 100644
index 0000000..f01d7c6
--- /dev/null
+++ b/tests/test_fgets.c
@@ -0,0 +1,15 @@
1#include "common.h"
2
3#define _GNU_SOURCE
4#include <poll.h>
5
6int main(int argc, char** argv) {
7 char buffer[12] = {0};
8
9 CHK_FAIL_START
10 fgets(buffer, 14, NULL);
11 CHK_FAIL_END
12
13 puts(buffer);
14 return ret;
15}