diff --git a/ChangeLog b/ChangeLog index af4245d3e597ad5c5a2efb44653c66d58d9590d6..01b67326c9715bd343c7a3317e795514a9387e24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-10-06 Per Cederqvist <ceder@ceder.dyndns.org> + Improve the test code. + * pcl_expect.py (Top level): Improve the test code. + Who can refuse the Inspiration? The impl, expectable and popen classes seems to work now. * pcl_expect.py (expectable.__init__): New argument: fileno. diff --git a/pcl_expect.py b/pcl_expect.py index bff35fe78ba56a4d39cc76c06e6ad5a0483d0fb3..e53afb36999153533963536500fbf3cdfaf301ce 100644 --- a/pcl_expect.py +++ b/pcl_expect.py @@ -255,19 +255,22 @@ if __name__ == '__main__': x = impl() while x.loop(): - if x.re(df, "^/.* .*\n"): + if x.re(df, "^/.* .*(?=\n)"): print "Normal line:", df.match.group() x.cont() continue - elif x.re(df, "^/.*\n"): + elif x.re(df, "^/.*(?=\n)"): print "Mount point only:", df.match.group() x.cont() continue - elif x.re(df, "^ .*\n"): + elif x.re(df, "^ .*(?=\n)"): print "Info only:", df.match.group() x.cont() continue - elif x.re(df, "^.*\n"): + elif x.re(df, "^\n"): + x.cont() + continue + elif x.re(df, "^.*(?=\n)"): print "Unexpected line", df.match.group() x.cont() continue