diff options
| author | jvoisin | 2023-07-09 16:11:24 +0200 |
|---|---|---|
| committer | jvoisin | 2023-07-09 16:11:24 +0200 |
| commit | 33acec595b47ec97ae57a98ec396a26f6d8e309e (patch) | |
| tree | 971717fb9cf43345f513db0849fdbfb2a410c5f9 /tests/test_getgroups.c | |
| parent | 6939c9e0c241bb348c006d07ee423ed5aeb0e707 (diff) | |
Add tests for unistd.h
Diffstat (limited to 'tests/test_getgroups.c')
| -rw-r--r-- | tests/test_getgroups.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_getgroups.c b/tests/test_getgroups.c new file mode 100644 index 0000000..954654a --- /dev/null +++ b/tests/test_getgroups.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <unistd.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | gid_t list[12] = {0}; | ||
| 7 | |||
| 8 | getgroups(10, list); | ||
| 9 | |||
| 10 | CHK_FAIL_START | ||
| 11 | getgroups(14, list); | ||
| 12 | CHK_FAIL_END | ||
| 13 | |||
| 14 | puts((const char*)list); | ||
| 15 | return ret; | ||
| 16 | } | ||
