diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-01-15 23:08:59 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-01-15 23:08:59 +0000 |
commit | ca0834218adf25b9cf44601400c1c4a8600d9f5f (patch) | |
tree | d03ac3be5c40f1897b2b6802fb3b1a2b0c4e7cfe /test-mkdtemp.c | |
parent | 0ae9da150d599305f27b737214acfa3dc181d0e8 (diff) |
Diffstat (limited to 'test-mkdtemp.c')
-rw-r--r-- | test-mkdtemp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test-mkdtemp.c b/test-mkdtemp.c new file mode 100644 index 0000000000000..a0cb30e22f4a1 --- /dev/null +++ b/test-mkdtemp.c @@ -0,0 +1,12 @@ +#include <stdlib.h> +#include <unistd.h> + +int +main(void) +{ + char dirname[] = "/tmp/temp.XXXXXX"; + + if (mkdtemp(dirname) != dirname) + return 1; + return rmdir(dirname) == -1; +} |