diff options
Diffstat (limited to 'pkgs/build-support/libredirect/test.c')
-rw-r--r-- | pkgs/build-support/libredirect/test.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/build-support/libredirect/test.c b/pkgs/build-support/libredirect/test.c index b57664db3c1..722d1303771 100644 --- a/pkgs/build-support/libredirect/test.c +++ b/pkgs/build-support/libredirect/test.c @@ -2,6 +2,7 @@ #include <fcntl.h> #include <spawn.h> #include <stdio.h> +#include <stdlib.h> #include <unistd.h> #include <sys/stat.h> @@ -31,6 +32,10 @@ void test_execv(void) { assert(execv(TESTPATH, argv) == 0); } +void test_system(void) { + assert(system(TESTPATH) == 0); +} + int main(void) { FILE *testfp; @@ -50,6 +55,7 @@ int main(void) assert(stat(TESTPATH, &testsb) != -1); test_spawn(); + test_system(); test_execv(); /* If all goes well, this is never reached because test_execv() replaces |