diff options
Diffstat (limited to 'winsup/testsuite/winsup.api/nullgetcwd.c')
-rw-r--r-- | winsup/testsuite/winsup.api/nullgetcwd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/winsup/testsuite/winsup.api/nullgetcwd.c b/winsup/testsuite/winsup.api/nullgetcwd.c new file mode 100644 index 000000000..f7d873261 --- /dev/null +++ b/winsup/testsuite/winsup.api/nullgetcwd.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <string.h> +#include <unistd.h> +int +main (int argc, char *argv) +{ + char *cwd = getcwd (NULL, 256); + if (cwd == NULL) + { + fprintf (stderr, "%s: getcwd returns NULL\n", argv[0]); + exit (1); + } + + exit (0); +} + |