-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for creating directories at cwd
- Loading branch information
1 parent
c9035d3
commit f9850d5
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <sys/stat.h> | ||
#include <sys/types.h> | ||
|
||
int main() { | ||
int status = EXIT_FAILURE; | ||
|
||
const char *dirName1 = "test1"; | ||
if (mkdir(dirName1, 0755) != 0) { | ||
goto end; | ||
} | ||
|
||
const char *dirName2 = "./test2"; | ||
if (mkdir(dirName2, 0755) != 0) { | ||
goto end; | ||
} | ||
|
||
status = EXIT_SUCCESS; | ||
|
||
end: | ||
printf("%d", status); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
$WASMER -q run main.wasm --dir . > output | ||
|
||
rmdir test1 test2 2>/dev/null && printf "0" | diff -u output - 1>/dev/null |