   T.equal stderr.data().toString('utf8').indexOf(errmsg), 0, "found error message"
   cb()
 
+#=================================
+
 exports.check_stdout = (T,cb) ->
   await run { name : "echo", args : [ "hello", "world"] }, defer err, out
   T.no_error err
   T.equal out.toString('utf8'), "hello world\n", "got the right output"
   cb()  
+
+#=================================
 
 exports.check_stdin_1 = (T, cb) ->
   msg = "Now is the time for all good men to come to the aid of the party."

  T.assert (err.rc != 0), "...that wasn't 0"
  cb()

exports.launch_not_there_1 = (T,cb) ->
  await run { name : 'a_process_that_does_not_exist', quiet : true }, defer err
  T.assert err?, "error came back"
  T.equal err?.errno, 'ENOENT', "the ENOENT came back"
  cb()

exports.launch_not_there_2 = (T,cb) ->
  stderr = new BufferOutStream()


{BufferOutStream,BufferInStream,run} = require '../../lib/main'

#=================================

exports.launch_true = (T,cb) ->
  await run { name : "true" }, defer err
  T.no_error err
  cb()

#=================================

exports.launch_false = (T, cb) ->
  await run { name : 'false' }, defer err
