aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/procs.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/procs.cpp b/src/tests/procs.cpp
new file mode 100644
index 0000000..53e5142
--- /dev/null
+++ b/src/tests/procs.cpp
@@ -0,0 +1,22 @@
1#include "bu/process.h"
2
3#include <stdio.h>
4
5int main( int agrc, char *argv[] )
6{
7 Bu::Process p( argv[1], argv+1 );
8
9 char buf[1000];
10 for(;;)
11 {
12 int iSize = p.read( buf, 1000 );
13 if( iSize == 0 )
14 break;
15 fwrite( buf, iSize, 1, stdout );
16 if( iSize < 1000 )
17 break;
18 }
19
20 return 0;
21}
22