diff options
| author | jvoisin | 2023-05-30 20:53:31 +0200 |
|---|---|---|
| committer | jvoisin | 2023-05-30 20:53:31 +0200 |
| commit | 37d8733dc522c44f9cdb9247f4a59e23bf0a9659 (patch) | |
| tree | 97207d3e3b3c9f0bb054617f7e2215b4ac990492 /tests/test_getcwd.c | |
| parent | 1ace027335c9ca0ae400958aded936d04505ec86 (diff) | |
Add a test for getcwd
Diffstat (limited to 'tests/test_getcwd.c')
| -rw-r--r-- | tests/test_getcwd.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_getcwd.c b/tests/test_getcwd.c new file mode 100644 index 0000000..14a55fa --- /dev/null +++ b/tests/test_getcwd.c | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <string.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | char buffer[12] = {0}; | ||
| 7 | |||
| 8 | CHK_FAIL_START | ||
| 9 | getcwd(buffer, 14); | ||
| 10 | CHK_FAIL_END | ||
| 11 | |||
| 12 | puts(buffer); | ||
| 13 | return ret; | ||
| 14 | } | ||
