Changeset: 65e7c968be12 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65e7c968be12
Added Files:
        sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql.in
        sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.txt
Removed Files:
        sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql
Modified Files:
        sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
        sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
Branch: Apr2012
Log Message:

url_script_test: "fix" and provide stable outputs

Now getContent actually works, try to use it on a local file, such that
we don't need an internet connection to check if it works.

Approved all output of the operations, while most of them are wrong.
This is inherent to the ad-hoc parsing style employed.  Still approving,
since the output seems to be the intended output (although it doesn't
make much sense).


diffs (291 lines):

diff --git a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql 
b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql.in
rename from sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql
rename to sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql.in
--- a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql
+++ b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.sql.in
@@ -8,8 +8,6 @@ select getAnchor(u) from t;
 
 select getBasename(u) from t;
 
-select getContent(u) from t;
-
 select getContext(u) from t;
 
 select getDomain(u) from t;
@@ -38,3 +36,12 @@ select newurl('https','www.monetdb.org',
 select newurl('https','localhost','boe');
 
 drop table t;
+
+create table t(u url);
+
+-- this works on UNIX, on Windows we likely need an extra / after file://
+insert into t values ('file://$TSTSRCDIR/url_script_test.Bug-2972.txt');
+
+select getContent(u) from t;
+
+drop table t;
diff --git a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err 
b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
--- a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
+++ b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
@@ -1,37 +1,3 @@
 stderr of test 'url_script_test.Bug-2972` in directory 'test/BugTracker-2012` 
itself:
 
 
-# 14:12:34 >  
-# 14:12:34 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"gdk_dbfarm=/ufs/manegold/_/Monet/HG/Dec2011/prefix/--disable-debug_--enable-optimize_--disable-assert/var/MonetDB"
 "--set" "mapi_open=true" "--set" "mapi_port=36122" "--set" "monet_prompt=" 
"--trace" "--forcemito" "--set" "mal_listing=2" 
"--dbname=mTests_test_BugTracker-2012" "--set" "mal_listing=0"
-# 14:12:34 >  
-
-# builtin opt  gdk_dbname = demo
-# builtin opt  gdk_dbfarm = 
/ufs/manegold/_/Monet/HG/Dec2011/prefix/--disable-debug_--enable-optimize_--disable-assert/var/monetdb5/dbfarm
-# builtin opt  gdk_debug = 0
-# builtin opt  gdk_alloc_map = no
-# builtin opt  gdk_vmtrim = yes
-# 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  gdk_dbfarm = 
/ufs/manegold/_/Monet/HG/Dec2011/prefix/--disable-debug_--enable-optimize_--disable-assert/var/MonetDB
-# cmdline opt  mapi_open = true
-# cmdline opt  mapi_port = 36122
-# cmdline opt  monet_prompt = 
-# cmdline opt  mal_listing = 2
-# cmdline opt  gdk_dbname = mTests_test_BugTracker-2012
-# cmdline opt  mal_listing = 0
-
-# 14:12:34 >  
-# 14:12:34 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=rome" 
"--port=36122"
-# 14:12:34 >  
-
-
-# 14:12:34 >  
-# 14:12:34 >  "Done."
-# 14:12:34 >  
-
diff --git a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out 
b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
--- a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
+++ b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
@@ -1,31 +1,195 @@
 stdout of test 'url_script_test.Bug-2972` in directory 'test/BugTracker-2012` 
itself:
 
 
-# 14:12:34 >  
-# 14:12:34 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"gdk_dbfarm=/ufs/manegold/_/Monet/HG/Dec2011/prefix/--disable-debug_--enable-optimize_--disable-assert/var/MonetDB"
 "--set" "mapi_open=true" "--set" "mapi_port=36122" "--set" "monet_prompt=" 
"--trace" "--forcemito" "--set" "mal_listing=2" 
"--dbname=mTests_test_BugTracker-2012" "--set" "mal_listing=0"
-# 14:12:34 >  
+# 06:50:52 >  
+# 06:50:52 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"gdk_dbfarm=/export/scratch/fabian/monetdb/Apr2012/mtest-zonnestraal/sql/dbfarm"
 "--set" "mapi_open=true" "--set" "mapi_port=38767" "--set" "monet_prompt=" 
"--trace" "--forcemito" "--set" "mal_listing=2" 
"--dbname=mTests_test_BugTracker-2012" "--set" "mal_listing=0"
+# 06:50:52 >  
 
-# MonetDB 5 server v11.7.2
-# This is an unreleased version
-# Serving database 'mTests_test_BugTracker-2012', using 8 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Found 15.662 GiB available main-memory.
+# MonetDB 5 server v11.9.0 "Apr2012-88aa9e3f55fc"
+# Serving database 'mTests_test_BugTracker-2012', using 64 threads
+# Compiled for sparc-sun-solaris2.10/32bit with 32bit OIDs dynamically linked
+# Found 4.000 GiB available main-memory.
 # Copyright (c) 1993-July 2008 CWI.
 # Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
 # Visit http://www.monetdb.org/ for further information
-# Listening for connection requests on mapi:monetdb://rome.ins.cwi.nl:36122/
+# Listening for connection requests on mapi:monetdb://zonnestraal:38767/
 # MonetDB/GIS module loaded
 # MonetDB/SQL module loaded
 
 Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_history.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_compress.sql
+# loading sql script: 18_dictionary.sql
+# loading sql script: 19_cluster.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 99_system.sql
 
-# 14:12:34 >  
-# 14:12:34 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=rome" 
"--port=36122"
-# 14:12:34 >  
+# 06:50:54 >  
+# 06:50:54 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=zonnestraal" "--port=38767"
+# 06:50:54 >  
 
-! To be checked & approved !
+#create table t(u url);
+#insert into t values('http://www.cwi.nl/~mk/vision2011.pdf');
+[ 1    ]
+#insert into t values('http://www.monetdb.com?x=2');
+[ 1    ]
+#insert into t 
values('http://www.monetdb.org:8080/Documentation/Manuals/SQLreference/Datamanipulation');
+[ 1    ]
+#select getAnchor(u) from t;
+% sys. # table_name
+% getanchor_u # name
+% clob # type
+% 0 # length
+[ NULL ]
+[ NULL ]
+[ NULL ]
+#select getBasename(u) from t;
+% sys. # table_name
+% getbasename_u # name
+% clob # type
+% 16 # length
+[ "vision2011" ]
+[ "www"        ]
+[ "Datamanipulation"   ]
+#select getContext(u) from t;
+% sys. # table_name
+% getcontext_u # name
+% clob # type
+% 52 # length
+[ "/~mk/vision2011.pdf"        ]
+[ NULL ]
+[ "/Documentation/Manuals/SQLreference/Datamanipulation"       ]
+#select getDomain(u) from t;
+% sys. # table_name
+% getdomain_u # name
+% clob # type
+% 7 # length
+[ "nl" ]
+[ "com?x=2"    ]
+[ "org"        ]
+#select getExtension(u) from t;
+% sys. # table_name
+% getextension_u # name
+% clob # type
+% 15 # length
+[ "pdf"        ]
+[ "monetdb.com?x=2"    ]
+[ NULL ]
+#select getFile(u) from t;
+% sys. # table_name
+% getfile_u # name
+% clob # type
+% 19 # length
+[ "vision2011.pdf"     ]
+[ "www.monetdb.com?x=2"        ]
+[ "Datamanipulation"   ]
+#select getHost(u) from t;
+% sys. # table_name
+% gethost_u # name
+% clob # type
+% 20 # length
+[ "www.cwi.nl" ]
+[ "www.monetdb.com?x=2"        ]
+[ "www.monetdb.org:8080"       ]
+#select getPort(u) from t;
+% sys. # table_name
+% getport_u # name
+% clob # type
+% 4 # length
+[ NULL ]
+[ NULL ]
+[ "8080"       ]
+#select getQuery(u) from t;
+% sys. # table_name
+% getquery_u # name
+% clob # type
+% 3 # length
+[ NULL ]
+[ "x=2"        ]
+[ NULL ]
+#select getUser(u) from t;
+% sys. # table_name
+% getuser_u # name
+% clob # type
+% 2 # length
+[ "mk" ]
+[ NULL ]
+[ NULL ]
+#select getRobotURL(u) from t;
+% sys. # table_name
+% getroboturl_u # name
+% clob # type
+% 38 # length
+[ "http://www.cwi.nl/robots.txt";       ]
+[ "http://www.monetdb.com?x=2/robots.txt";      ]
+[ "http://www.monetdb.org:8080/robots.txt";     ]
+#select isaURL(u) from t;
+% sys. # table_name
+% isaurl_u # name
+% boolean # type
+% 5 # length
+[ true ]
+[ true ]
+[ true ]
+#select isaURL('http://www.monetdb.org');
+% . # table_name
+% isaurl_single_value # name
+% boolean # type
+% 5 # length
+[ true ]
+#select isaURL('http://www.monetdb.org');
+% . # table_name
+% isaurl_single_value # name
+% boolean # type
+% 5 # length
+[ true ]
+#select isaURL('htp:///www.monetdb.org');
+% . # table_name
+% isaurl_single_value # name
+% boolean # type
+% 5 # length
+[ true ]
+#select newurl('https','www.monetdb.org',8080,'blah');
+% . # table_name
+% newurl_single_value # name
+% url # type
+% 33 # length
+[ https://www.monetdb.org:8080/blah    ]
+#select newurl('https','localhost','boe');
+% . # table_name
+% newurl_single_value # name
+% url # type
+% 21 # length
+[ https://localhost/boe        ]
+#drop table t;
+#create table t(u url);
+#insert into t values 
('file:///export/home/fabian/monetdb/Apr2012/hgrepo/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.txt');
+[ 1    ]
+#select getContent(u) from t;
+% sys. # table_name
+% getcontent_u # name
+% clob # type
+% 141 # length
+[ "This file is read by the url_script_test.Bug-2972 test.\nIf you change 
this, you likely want to change the stable output of the\ntest as well.\n"   ]
+#drop table t;
 
-# 14:12:34 >  
-# 14:12:34 >  "Done."
-# 14:12:34 >  
+# 06:50:55 >  
+# 06:50:55 >  "Done."
+# 06:50:55 >  
 
diff --git a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.txt 
b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.txt
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.txt
@@ -0,0 +1,3 @@
+This file is read by the url_script_test.Bug-2972 test.
+If you change this, you likely want to change the stable output of the
+test as well.
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to