summaryrefslogtreecommitdiff
path: root/src/tests/procs.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-03-30 22:33:41 +0000
committerMike Buland <eichlan@xagasoft.com>2011-03-30 22:33:41 +0000
commit4b9289cfb260f4bcecaf23a810584ef6ef8e8501 (patch)
tree79136af08c7e42ba3322f0d73e9779e4354b318a /src/tests/procs.cpp
parentc7636dc954eddfe58f7959392602fbc9072d77e7 (diff)
downloadlibbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.gz
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.bz2
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.xz
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.zip
Ok, string stuff is working much, much better, a load of new unit tests have
been added, and I deleted a whole slew of stupid old tests that I don't need.
Diffstat (limited to 'src/tests/procs.cpp')
-rw-r--r--src/tests/procs.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/tests/procs.cpp b/src/tests/procs.cpp
deleted file mode 100644
index 94d2cc5..0000000
--- a/src/tests/procs.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#include "bu/process.h"
9
10#include <stdio.h>
11
12int main()
13{
14 Bu::Process p( Bu::Process::Both, "/bin/bash", "/bin/bash", "-c", "echo Hello 1>&2; echo StdOut; sleep 1; echo Yup; echo Yup 1>&2", NULL );
15
16 char buf[1000];
17 while( !p.isEos() )
18 {
19 bool out, err;
20 p.select( out, err );
21 if( out )
22 {
23 int iSize = p.read( buf, 1000 );
24 printf("::read=%d::\n", iSize );
25 fwrite( buf, iSize, 1, stdout );
26 }
27 if( err )
28 {
29 int iSize = p.readErr( buf, 1000 );
30 printf("::readErr=%d::\n", iSize );
31 fwrite( buf, iSize, 1, stdout );
32 }
33 }
34
35 return 0;
36}
37