Changeset: b5d9f67cef75 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b5d9f67cef75
Added Files:
        sql/test/BugTracker-2009/Tests/BOM.SF-2787813.py
Removed Files:
        sql/test/BugTracker-2009/Tests/BOM.SF-2787813.sql
        sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test
Modified Files:
        sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.err
        sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.out
        sql/test/BugTracker-2010/Tests/unicode-bom.Bug-2641.py
Branch: mtest
Log Message:

Another badly converted BOM test and don't forget to check the expected result


diffs (159 lines):

diff --git a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.sql 
b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.py
rename from sql/test/BugTracker-2009/Tests/BOM.SF-2787813.sql
rename to sql/test/BugTracker-2009/Tests/BOM.SF-2787813.py
--- a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.sql
+++ b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.py
@@ -1,1 +1,21 @@
-select 1;
+import sys
+
+try:
+    from MonetDBtesting import process
+except ImportError:
+    import process
+
+
+# This line starts with the BOM followed by SELECT 1;\n
+INPUT1 = b"\xEF\xBB\xBF\x53\x45\x4C\x45\x43\x54\x20\x31\x3B\x0A"
+with process.client('sql', text=False, stdin=process.PIPE, 
stdout=process.PIPE, stderr=process.PIPE) as c:
+    out, err = c.communicate(INPUT1)
+    retcode = c.returncode
+
+    if retcode == 0:
+        sys.stderr.write("Expected nonzero return code")
+    if not err or b'Unexpected character (U+FEFF)' not in err:
+        sys.stderr.write("Expected stderr to contain 'Unexpected character 
(U+FEFF)'")
+    if "[ 1\\t]" not in str(out):
+        sys.stderr.write("The select 1; after the BOM character should have 
run and returned the result 1")
+
diff --git a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.err 
b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.err
--- a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.err
+++ b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.err
@@ -5,72 +5,6 @@ stderr of test 'BOM.SF-2787813` in direc
 # 17:07:23 >   mserver5 "--config=/ufs/sjoerd/Monet-Stable/etc/monetdb5.conf" 
--debug=10 --set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/src/backends/monet5/.libs:/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/src/backends/monet5:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5/bin"
 --set 
"gdk_dbfarm=/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/dbfarm" 
   --set mapi_open=true --set xrpc_open=true --set mapi_port=35738 --set 
xrpc_port=45769 --set monet_prompt= --trace  
"--dbname=mTests_src_test_BugTracker-2009" --set mal_listing=0 "--dbinit= 
include sql;" ; echo ; echo Over..
 # 17:07:23 >  
 
-# builtin opt  gdk_arch = 64bitx86_64-unknown-linux-gnu
-# builtin opt  gdk_version = 1.30.0
-# builtin opt  prefix = /ufs/sjoerd/Monet-Stable
-# builtin opt  exec_prefix = ${prefix}
-# builtin opt  gdk_dbname = tst
-# builtin opt  gdk_dbfarm = ${prefix}/var/MonetDB
-# builtin opt  gdk_debug = 8
-# builtin opt  gdk_alloc_map = yes
-# builtin opt  gdk_vmtrim = yes
-# builtin opt  monet_admin = adm
-# builtin opt  monet_prompt = >
-# builtin opt  monet_welcome = yes
-# builtin opt  monet_mod_path = ${prefix}/lib64/MonetDB
-# builtin opt  monet_daemon = yes
-# builtin opt  host = localhost
-# builtin opt  mapi_port = 50000
-# builtin opt  mapi_noheaders = no
-# builtin opt  mapi_debug = 0
-# builtin opt  mapi_clients = 2
-# builtin opt  sql_debug = 0
-# builtin opt  sql_logdir = sql_logs
-# builtin opt  xquery_logdir = xquery_logs
-# builtin opt  standoff_ns = http://monetdb.cwi.nl/standoff
-# builtin opt  standoff_start = start
-# builtin opt  standoff_end = end
-# config opt   prefix = /ufs/sjoerd/Monet-Stable
-# config opt   config = ${prefix}/etc/monetdb5.conf
-# config opt   prefix = /ufs/sjoerd/Monet-Stable
-# config opt   exec_prefix = ${prefix}
-# config opt   gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
-# config opt   gdk_dbname = demo
-# config opt   gdk_alloc_map = no
-# config opt   gdk_embedded = no
-# config opt   gdk_debug = 0
-# config opt   monet_mod_path = 
${prefix}/lib64/MonetDB5:${prefix}/lib64/MonetDB5/lib:${prefix}/lib64/MonetDB5/bin
-# config opt   monet_daemon = no
-# config opt   monet_welcome = yes
-# config opt   mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log
-# config opt   mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log
-# config opt   mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid
-# config opt   mero_exittimeout = 7
-# config opt   mero_doproxy = yes
-# config opt   mero_discoveryttl = 600
-# config opt   mal_init = ${prefix}/lib64/MonetDB5/mal_init.mal
-# config opt   mal_listing = 2
-# config opt   mapi_port = 50000
-# config opt   mapi_open = false
-# config opt   sql_logdir = sql_logs
-# cmdline opt  config = /ufs/sjoerd/Monet-Stable/etc/monetdb5.conf
-# cmdline opt  gdk_nr_threads = 0
-# cmdline opt  monet_mod_path = 
/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/src/backends/monet5/.libs:/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/src/backends/monet5:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5/bin
-# cmdline opt  gdk_dbfarm = 
/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/dbfarm
-# cmdline opt  mapi_open = true
-# cmdline opt  xrpc_open = true
-# cmdline opt  mapi_port = 35738
-# cmdline opt  xrpc_port = 45769
-# cmdline opt  monet_prompt = 
-# cmdline opt  gdk_dbname = mTests_src_test_BugTracker-2009
-# cmdline opt  mal_listing = 0
-#warning: please don't forget to set your vault key!
-#(see /ufs/sjoerd/Monet-Stable/etc/monetdb5.conf)
-
-# 17:07:23 >  
-# 17:07:23 >  mclient -lsql -umonetdb -Pmonetdb --host=ottar --port=35738 
-# 17:07:23 >  
-
 
 # 17:07:23 >  
 # 17:07:23 >  Done.
diff --git a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.out 
b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.out
--- a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.out
+++ b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.stable.out
@@ -5,30 +5,6 @@ stdout of test 'BOM.SF-2787813` in direc
 # 17:07:23 >   mserver5 "--config=/ufs/sjoerd/Monet-Stable/etc/monetdb5.conf" 
--debug=10 --set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/src/backends/monet5/.libs:/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/src/backends/monet5:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-Stable/lib64/MonetDB5/bin"
 --set 
"gdk_dbfarm=/ufs/sjoerd/src/MonetDB/stable/sql/x86_64-unknown-linux-gnu/dbfarm" 
   --set mapi_open=true --set xrpc_open=true --set mapi_port=35738 --set 
xrpc_port=45769 --set monet_prompt= --trace  
"--dbname=mTests_src_test_BugTracker-2009" --set mal_listing=0 "--dbinit= 
include sql;" ; echo ; echo Over..
 # 17:07:23 >  
 
-# MonetDB server v5.12.0, based on kernel v1.30.0
-# Serving database 'mTests_src_test_BugTracker-2009', using 4 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Copyright (c) 1993-July 2008 CWI.
-# Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved
-# Visit http://monetdb.cwi.nl/ for further information
-# Listening for connection requests on mapi:monetdb://ottar.ins.cwi.nl:35738/
-# MonetDB/SQL module v2.30.0 loaded
-
-#function user.main():void;
-#    clients.quit();
-#end main;
-
-
-# 17:07:23 >  
-# 17:07:23 >  mclient -lsql -umonetdb -Pmonetdb --host=ottar --port=35738 
-# 17:07:23 >  
-
-#select 1;
-% .%2 # table_name
-% %2 # name
-% tinyint # type
-% 1 # length
-[ 1    ]
 
 # 17:07:23 >  
 # 17:07:23 >  Done.
diff --git a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test 
b/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test
deleted file mode 100644
--- a/sql/test/BugTracker-2009/Tests/BOM.SF-2787813.test
+++ /dev/null
@@ -1,4 +0,0 @@
-statement error
-select 1
-
-
diff --git a/sql/test/BugTracker-2010/Tests/unicode-bom.Bug-2641.py 
b/sql/test/BugTracker-2010/Tests/unicode-bom.Bug-2641.py
--- a/sql/test/BugTracker-2010/Tests/unicode-bom.Bug-2641.py
+++ b/sql/test/BugTracker-2010/Tests/unicode-bom.Bug-2641.py
@@ -31,6 +31,8 @@ with process.client('sql', text=False, s
         sys.stderr.write("Expected nonzero return code")
     if not err or b'Unexpected character (U+FEFF)' not in err:
         sys.stderr.write("Expected stderr to contain 'Unexpected character 
(U+FEFF)'")
+    if "[ 1\\t]" not in str(out):
+        sys.stderr.write("The select 1; after the BOM character should have 
run and returned the result 1")
 
 # This line has the BOM in the middle of the SELECT 1;\n
 INPUT3 = b"\x53\x45\x4C\xEF\xBB\xBF\x45\x43\x54\x20\x31\x3B\x0A"
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to