Changeset: da2e83b1a44d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/da2e83b1a44d
Modified Files:
sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py
Branch: default
Log Message:
Add some more possible error messages.
diffs (62 lines):
diff --git
a/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py
b/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py
--- a/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py
+++ b/sql/test/BugTracker-2022/Tests/incomplete-sql-script.Bug-7298.SQL.py
@@ -10,50 +10,44 @@ with SQLTestCase() as tc:
tf.seek(0)
tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error,
unexpected end of file in: "select foo"', '!syntax error in: "select foo"',
'!syntax error, unexpected $end in: "select foo"'])
- tf.seek(0)
- tf.truncate(0)
+ with tempfile.TemporaryFile('w+') as tf:
s1 = "select E'foo"
tf.write(s1)
tf.flush()
tf.seek(0)
tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message='!Unexpected end of input')
- tf.seek(0)
- tf.truncate(0)
+ with tempfile.TemporaryFile('w+') as tf:
s1 = "select foo."
tf.write(s1)
tf.flush()
tf.seek(0)
- tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error,
unexpected end of file, expecting SCOLON or \':\' in: "select foo."', '!syntax
error in: "select foo."', '!syntax error, unexpected $end, expecting SCOLON or
\':\' in: "select foo."', '!syntax error, unexpected $end in: "select foo."'])
- tf.seek(0)
- tf.truncate(0)
+ tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error,
unexpected end of file, expecting SCOLON or \':\' in: "select foo."', '!syntax
error in: "select foo."', '!syntax error, unexpected $end, expecting SCOLON or
\':\' in: "select foo."', '!syntax error, unexpected $end in: "select foo."',
'!syntax error, unexpected end of file in: "select foo."'
+])
+ with tempfile.TemporaryFile('w+') as tf:
s1 = "select foo-"
tf.write(s1)
tf.flush()
tf.seek(0)
- tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error,
unexpected end of file, expecting SCOLON or \':\' in: "select foo-"', '!syntax
error in: "select foo-"', '!syntax error, unexpected $end, expecting SCOLON or
\':\' in: "select foo-"', '!syntax error, unexpected $end in: "select foo-"'])
- tf.seek(0)
- tf.truncate(0)
+ tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error,
unexpected end of file, expecting SCOLON or \':\' in: "select foo-"', '!syntax
error in: "select foo-"', '!syntax error, unexpected $end, expecting SCOLON or
\':\' in: "select foo-"', '!syntax error, unexpected $end in: "select foo-"',
'!syntax error, unexpected end of file in: "select foo-"'])
+ with tempfile.TemporaryFile('w+') as tf:
s1 = "select f001234"
tf.write(s1)
tf.flush()
tf.seek(0)
tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message=['!syntax error,
unexpected end of file in: "select f001234"', '!syntax error in: "select
f001234"', '!syntax error, unexpected $end in: "select f001234"'])
- tf.seek(0)
- tf.truncate(0)
+ with tempfile.TemporaryFile('w+') as tf:
s1 = "select \"foo"
tf.write(s1)
tf.flush()
tf.seek(0)
tc.execute(None, '-fraw', client='mclient',
stdin=tf).assertFailed(err_code="42000", err_message='!Unexpected end of input')
- tf.seek(0)
- tf.truncate(0)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]