summaryrefslogtreecommitdiffstats
path: root/test-mkstemps.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-mkstemps.c')
-rw-r--r--test-mkstemps.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test-mkstemps.c b/test-mkstemps.c
new file mode 100644
index 00000000..31460dca
--- /dev/null
+++ b/test-mkstemps.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main(void)
+{
+ char filename[] = "/tmp/temp.XXXXXX.suffix";
+
+ if (mkstemps(filename, 7) == -1)
+ return 1;
+ return unlink(filename) == -1;
+}