summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-02-19 12:03:42 +0100
committerunknown <msvensson@pilot.blaudden>2007-02-19 12:03:42 +0100
commitad41369d3fff34c66a8933cbb0febde3b76af303 (patch)
tree2d943209ec56a7511aaff48e658bfb824f67bd7a
parent2f7a4de64ba80c67b48aee23153a3a5272fb6ad5 (diff)
downloadmariadb-git-ad41369d3fff34c66a8933cbb0febde3b76af303.tar.gz
Update for running with cmd.exe directly
mysql-test/r/mysqltest.result: Update result file after removing one test mysql-test/t/mysqltest.test: Remove use of "ls" in system Rewrite "system echo" which introduces CR/LF problems with "write_file" Remove test for end of line junk for "write_file" - it has mismatching number of "'s
-rw-r--r--mysql-test/r/mysqltest.result2
-rw-r--r--mysql-test/t/mysqltest.test57
2 files changed, 35 insertions, 24 deletions
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index e1ebed8cacd..3ecafcab8a4 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -516,8 +516,6 @@ drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
-mysqltest: At line 1: End of line junk detected: "write_file filename ";
-"
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index e0d5591fc4f..634f651bd06 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -902,9 +902,9 @@ echo $d;
# ----------------------------------------------------------------------------
# Test system
# ----------------------------------------------------------------------------
-system ls > /dev/null;
+#system ls > /dev/null;
system echo "hej" > /dev/null;
---system ls > /dev/null
+#--system ls > /dev/null
--system echo "hej" > /dev/null;
--error 1
@@ -1134,18 +1134,24 @@ EOF
--error 1
--exec echo "{;" | $MYSQL_TEST 2>&1
---system echo "while (0)" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+while (0)
+echo hej;
+EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
---system echo "while (0)" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "{echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+while (0)
+{echo hej;
+EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
---system echo "while (0){" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+while (0){
+ echo hej;
+EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
@@ -1244,28 +1250,34 @@ EOF
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1
# Repeat connect/disconnect, exceed max number of connections
---system echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "{" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "}" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+let $i=200;
+while ($i)
+{
+ connect (test_con1,localhost,root,,);
+ disconnect test_con1;
+ dec $i;
+}
+EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
# Select disconnected connection
---system echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "connection test_con1;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+connect (test_con1,localhost,root,,);
+disconnect test_con1;
+connection test_con1;
+EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
# Connection name already used
---system echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "connect (test_con1,localhost,root,,);" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+connect (test_con1,localhost,root,,);
+connect (test_con1,localhost,root,,);
+EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
@@ -1502,8 +1514,9 @@ remove_file non_existing_file;
--error 1
--exec echo "write_file filename ;" | $MYSQL_TEST 2>&1
---error 1
---exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
+# Comment out this test as it confuses cmd.exe with unmatched "
+#--error 1
+#--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1