From 30a7cbdacf5ffaaef71b217dcd89eecb58a2ee7c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Oct 2000 00:15:35 -0500 Subject: [PATCH] README BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/xsl/README mysqltest.xsl BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/xsl/mysqltest.xsl sel000001.xml BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/tests/sel000001.xml README BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/README --- mysql-test/xml/README | 74 ++++++++++++++++++++++++++++++ mysql-test/xml/tests/sel000001.xml | 20 ++++++++ mysql-test/xml/xsl/README | 4 ++ mysql-test/xml/xsl/mysqltest.xsl | 59 ++++++++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 mysql-test/xml/README create mode 100644 mysql-test/xml/tests/sel000001.xml create mode 100644 mysql-test/xml/xsl/README create mode 100644 mysql-test/xml/xsl/mysqltest.xsl diff --git a/mysql-test/xml/README b/mysql-test/xml/README new file mode 100644 index 00000000000..ee1af30db33 --- /dev/null +++ b/mysql-test/xml/README @@ -0,0 +1,74 @@ +This directory contains all of the test cases for the MySQL Test Suite +marked up in XML. + +To convert these test cases from XML into 'mysqltest' format, one needs +an XSL translator installed on their system. At MySQL, we use Sablotron +(http://www.gingerall.com/). Once installed, conversion happens with a +command like this: + + sabcmd xsl/mysqltest.xsl < tests/sel000001.xml > sel000001.test + +The file 'sel000001.test' contains the plain text conversion that is +to be fed into the 'mysqltest' program. + +Below is an example of a test case marked up in XML; illustrating all +of the XML mark-up currently supported in our 'mysqltest.xsl' stylesheet. + +---------------------------------------------------- + + + + + + + + + + This test will monkey around trying to kill mysqld. + + + + + + SELECT y FROM foo WHERE bar='2' + + INSERT INTO foo VALUES (y='2') WHERE bar='1' + + + +---------------------------------------------------- + + +The converted (mysqltest format) output of this source XML file looks +like: + + +---------------------------------------------------- +# sel000001 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# This test will monkey around trying to kill mysqld. +# + + +connect(Test_Connect1, MyHostName, Matt, MattPass, MyDB, 3306, MyDB.sock) + +connection Test_Connect1 +INSERT INTO foo VALUES (y='2') WHERE bar='1'; +@sel000001.result SELECT y FROM foo WHERE bar='2'; +---------------------------------------------------- + + diff --git a/mysql-test/xml/tests/sel000001.xml b/mysql-test/xml/tests/sel000001.xml new file mode 100644 index 00000000000..4fc68106394 --- /dev/null +++ b/mysql-test/xml/tests/sel000001.xml @@ -0,0 +1,20 @@ + + + + + + + + + + This test is just a simple select. + + DROP TABLE IF EXISTS t + CREATE TABLE t (s CHAR(20) PRIMARY KEY, id INT) + INSERT INTO t VALUES ('cat', 1), ('mouse', 3), ('dog', 2), ('snake', 77) + + + SELECT s, id FROM t WHERE s = 'mouse' + + + diff --git a/mysql-test/xml/xsl/README b/mysql-test/xml/xsl/README new file mode 100644 index 00000000000..fe11b57cf11 --- /dev/null +++ b/mysql-test/xml/xsl/README @@ -0,0 +1,4 @@ +XML Stylesheets for converting test cases in XML to other forms. + + - mysqltest.xsl -> mysqltest format (text) + diff --git a/mysql-test/xml/xsl/mysqltest.xsl b/mysql-test/xml/xsl/mysqltest.xsl new file mode 100644 index 00000000000..8a1e738e611 --- /dev/null +++ b/mysql-test/xml/xsl/mysqltest.xsl @@ -0,0 +1,59 @@ + + + + + + + + + +# +# +# Versions +# -------- +# +# Description +# ----------- +# + + + + + + + + + + + + + + + +# + + + +# + + + +connect(, , , , , , ) + + + + +connection + + + + + + +@ + + + +; + +