sys.stdout.flush()
# TODO: do we need to support '\n' too
-import platform
-if platform.system().find("CYGWIN_NT") >= 0:
- # TODO: this is weird, is this really right on Cygwin?
- sep = "\n\r\n"
-else:
- sep = "\r\n"
+sep = "\r\n"
rundir = None
parser = argparse.ArgumentParser(
parser.add_argument('--debug-file', type=str,
help="Write all test interaction the named file")
parser.add_argument('--hard', action='store_true',
- help="Turn soft tests following a ';>>> soft=True' into hard failures")
+ help="Turn soft tests (soft, deferrable, optional) into hard failures")
# Control whether deferrable and optional tests are executed
parser.add_argument('--deferrable', dest='deferrable', action='store_true',
if header:
log("Started with:\n%s" % header)
else:
- log("Did not one of following prompt(s): %s" % repr(prompts))
+ log("Did not receive one of following prompt(s): %s" % repr(prompts))
log(" Got : %s" % repr(r.buf))
sys.exit(1)
# Send the pre-eval code if any
if args.pre_eval:
sys.stdout.write("RUNNING pre-eval: %s" % args.pre_eval)
- p.write(args.pre_eval)
- assert_prompt(args.test_timeout)
+ r.writeline(args.pre_eval)
+ assert_prompt(r, ['[^\s()<>]+> '], args.test_timeout)
test_cnt = 0
pass_cnt = 0