Changeset: 6a5d89eaeec9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6a5d89eaeec9
Modified Files:
testing/sqllogictest.py
Branch: Sep2022
Log Message:
Allow ellipsis (...) in expected error message in .test files to indicate
prefix match.
diffs (25 lines):
diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py
--- a/testing/sqllogictest.py
+++ b/testing/sqllogictest.py
@@ -246,6 +246,9 @@ class SQLLogic:
# check whether failed as expected
err_code_received, err_msg_received =
utils.parse_mapi_err_msg(msg)
if expected_err_code and expected_err_msg and
err_code_received and err_msg_received:
+ if expected_err_msg.endswith('...') and
expected_err_code == err_code_received and
err_msg_received.lower().startswith(expected_err_msg[:expected_err_msg.find('...')].lower()):
+ result.append(err_code_received + '!' +
expected_err_msg)
+ return result
result.append(err_code_received + '!' +
err_msg_received)
if expected_err_code == err_code_received and
expected_err_msg.lower() == err_msg_received.lower():
return result
@@ -254,7 +257,10 @@ class SQLLogic:
result.append(err_code_received + '!')
if expected_err_code == err_code_received:
return result
- if expected_err_msg and err_msg_received:
+ elif expected_err_msg and err_msg_received:
+ if expected_err_msg.endswith('...') and
err_msg_received.lower().startswith(expected_err_msg[:expected_err_msg.find('...')].lower()):
+ result.append(expected_err_msg)
+ return result
result.append(err_msg_received)
if expected_err_msg.lower() ==
err_msg_received.lower():
return result
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]