From 8a12ce2cf9bb6362e380e7efaee334d82cc3c7c8 Mon Sep 17 00:00:00 2001 From: Steven Murdoch Date: Sun, 10 Oct 2010 18:12:23 +0100 Subject: Add a unit test for tor_spawn_background - Test sucessfully starting a process - Test failing to find the executable --- src/test/test-child.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/test/test-child.c (limited to 'src/test/test-child.c') diff --git a/src/test/test-child.c b/src/test/test-child.c new file mode 100644 index 0000000000..100e8c0f32 --- /dev/null +++ b/src/test/test-child.c @@ -0,0 +1,18 @@ +#include + +/** Trivial test program which prints out its command line arguments so we can + * check if tor_spawn_background() works */ +int +main(int argc, char **argv) +{ + int i; + + fprintf(stdout, "OUT\n"); + fprintf(stderr, "ERR\n"); + for (i = 0; i < argc; i++) + fprintf(stdout, "%s\n", argv[i]); + fprintf(stdout, "DONE\n"); + + return 0; +} + -- cgit v1.2.3-54-g00ecf