Author: laukpe
Date: Wed Sep 24 10:15:29 2008
New Revision: 825

Modified:
   trunk/atest/resources/TestCheckerLibrary.py

Log:
Require that expected errors specfied with REGEXP: match the whole error, and those those specified with STARTS: contain at least something

Modified: trunk/atest/resources/TestCheckerLibrary.py
==============================================================================
--- trunk/atest/resources/TestCheckerLibrary.py (original)
+++ trunk/atest/resources/TestCheckerLibrary.py Wed Sep 24 10:15:29 2008
@@ -80,10 +80,12 @@
             return
         if test.exp_message.startswith('REGEXP:'):
             pattern = test.exp_message.replace('REGEXP:', '', 1).strip()
-            if re.match(pattern, test.message):
+            if re.match('^%s$' % pattern, test.message, re.DOTALL):
                 return
         if test.exp_message.startswith('STARTS:'):
             start = test.exp_message.replace('STARTS:', '', 1).strip()
+            if start == '':
+                raise RuntimeError("Empty 'STARTS:' is not allowed")
             if test.message.startswith(start):
                 return

Reply via email to