Changeset: 66907ee54fc3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66907ee54fc3
Added Files:
        sql/test/Tests/unicode.sql
        sql/test/Tests/unicode.stable.err
        sql/test/Tests/unicode.stable.out
Modified Files:
        sql/test/Tests/All
Branch: Apr2019
Log Message:

Add a test for Unicode escape sequences.


diffs (123 lines):

diff --git a/sql/test/Tests/All b/sql/test/Tests/All
--- a/sql/test/Tests/All
+++ b/sql/test/Tests/All
@@ -133,3 +133,4 @@ THREADS=1?fsum1
 
 NOT_WIN32&HAVE_LIBLZ4?copy-into-lz4
 NOT_WIN32&HAVE_LIBLZ4?copy-from-lz4
+unicode
diff --git a/sql/test/Tests/unicode.sql b/sql/test/Tests/unicode.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/unicode.sql
@@ -0,0 +1,14 @@
+start transaction;
+
+create table unicodetest (
+  U&"&015D" UESCAPE '&' varchar(4)   -- LATIN SMALL LETTER S WITH CIRCUMFLEX
+);
+-- twice the same string in two different ways
+insert into unicodetest values (U&'&+01F525&+01F692&+01F6F1&+01F9EF' UESCAPE 
'&');
+insert into unicodetest values (U&'\+01F525\+01F692\+01F6F1\+01F9EF');
+insert into unicodetest values (U&'\23ba\23bb\23bc\23bd');
+insert into unicodetest values (U&'%23ba%23bb%23bc%23bd' UESCAPE '%');
+
+select * from unicodetest;
+
+rollback;
diff --git a/sql/test/Tests/unicode.stable.err 
b/sql/test/Tests/unicode.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/unicode.stable.err
@@ -0,0 +1,33 @@
+stderr of test 'unicode` in directory 'sql/test` itself:
+
+
+# 05:41:41 >  
+# 05:41:41 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30675" "--set" 
"mapi_usock=/var/tmp/mtest-27361/.s.monetdb.30675" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/sjoerd/@Monet-candidate/var/MonetDB/mTests_sql_test" "--set" 
"embedded_c=true"
+# 05:41:41 >  
+
+# builtin opt  gdk_dbpath = 
/home/sjoerd/@Monet-candidate/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30675
+# cmdline opt  mapi_usock = /var/tmp/mtest-27361/.s.monetdb.30675
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/sjoerd/@Monet-candidate/var/MonetDB/mTests_sql_test
+# cmdline opt  embedded_c = true
+#main thread:!ERROR:MALException:client.quit:Server stopped
+
+# 05:41:41 >  
+# 05:41:41 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-27361" "--port=30675"
+# 05:41:41 >  
+
+
+# 05:41:42 >  
+# 05:41:42 >  "Done."
+# 05:41:42 >  
+
diff --git a/sql/test/Tests/unicode.stable.out 
b/sql/test/Tests/unicode.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/unicode.stable.out
@@ -0,0 +1,53 @@
+stdout of test 'unicode` in directory 'sql/test` itself:
+
+
+# 05:41:41 >  
+# 05:41:41 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30675" "--set" 
"mapi_usock=/var/tmp/mtest-27361/.s.monetdb.30675" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/sjoerd/@Monet-candidate/var/MonetDB/mTests_sql_test" "--set" 
"embedded_c=true"
+# 05:41:41 >  
+
+# MonetDB 5 server v11.33.0 (hg id: 45690647d30c+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test', using 4 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.511 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://meeuw.mullender.nl:30675/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-27361/.s.monetdb.30675
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 05:41:41 >  
+# 05:41:41 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-27361" "--port=30675"
+# 05:41:41 >  
+
+#start transaction;
+#create table unicodetest (
+#  U&"&015D" UESCAPE '&' varchar(4)   -- LATIN SMALL LETTER S WITH CIRCUMFLEX
+#);
+#insert into unicodetest values (U&'&+01F525&+01F692&+01F6F1&+01F9EF' UESCAPE 
'&');
+[ 1    ]
+#insert into unicodetest values (U&'\+01F525\+01F692\+01F6F1\+01F9EF');
+[ 1    ]
+#insert into unicodetest values (U&'\23ba\23bb\23bc\23bd');
+[ 1    ]
+#insert into unicodetest values (U&'%23ba%23bb%23bc%23bd' UESCAPE '%');
+[ 1    ]
+#select * from unicodetest;
+% sys.unicodetest # table_name
+% ŝ # name
+% varchar # type
+% 6 # length
+[ "🔥🚒🛱🧯"       ]
+[ "🔥🚒🛱🧯"       ]
+[ "⎺⎻⎼⎽"       ]
+[ "⎺⎻⎼⎽"       ]
+#rollback;
+
+# 05:41:42 >  
+# 05:41:42 >  "Done."
+# 05:41:42 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to