Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c274b518
Commit
c274b518
authored
Jul 30, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new commands to mysqltest - to make it easier to write portable test scripts
parent
98e3552a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
500 additions
and
56 deletions
+500
-56
client/Makefile.am
client/Makefile.am
+2
-1
client/mysqltest.c
client/mysqltest.c
+412
-55
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+11
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+75
-0
No files found.
client/Makefile.am
View file @
c274b518
...
@@ -46,7 +46,8 @@ mysqladmin_SOURCES = mysqladmin.cc
...
@@ -46,7 +46,8 @@ mysqladmin_SOURCES = mysqladmin.cc
mysql_LDADD
=
@readline_link@ @TERMCAP_LIB@
$(LDADD)
$(CXXLDFLAGS)
mysql_LDADD
=
@readline_link@ @TERMCAP_LIB@
$(LDADD)
$(CXXLDFLAGS)
mysqltest_SOURCES
=
mysqltest.c
$(top_srcdir)
/mysys/my_getsystime.c
\
mysqltest_SOURCES
=
mysqltest.c
$(top_srcdir)
/mysys/my_getsystime.c
\
$(yassl_dummy_link_fix)
$(yassl_dummy_link_fix)
mysqltest_LDADD
=
$(top_builddir)
/regex/libregex.a
$(LDADD)
mysqltest_LDADD
=
$(top_builddir)
/regex/libregex.a
$(LDADD)
\
$(top_builddir)
/mysys/libmysys.a
mysqlbinlog_SOURCES
=
mysqlbinlog.cc
$(top_srcdir)
/mysys/mf_tempdir.c
\
mysqlbinlog_SOURCES
=
mysqlbinlog.cc
$(top_srcdir)
/mysys/mf_tempdir.c
\
$(top_srcdir)
/mysys/my_new.cc
\
$(top_srcdir)
/mysys/my_new.cc
\
$(top_srcdir)
/mysys/my_bit.c
\
$(top_srcdir)
/mysys/my_bit.c
\
...
...
client/mysqltest.c
View file @
c274b518
This diff is collapsed.
Click to expand it.
mysql-test/r/mysqltest.result
View file @
c274b518
...
@@ -467,3 +467,14 @@ a D
...
@@ -467,3 +467,14 @@ a D
1 1
1 1
1 4
1 4
drop table t1;
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'
hello
hello
hello
mysql-test/t/mysqltest.test
View file @
c274b518
...
@@ -1159,3 +1159,78 @@ insert into t1 values (2,4);
...
@@ -1159,3 +1159,78 @@ insert into t1 values (2,4);
--
replace_regex
/
A
/
C
/
/
B
/
D
/
i
/
3
/
2
/
/
2
/
1
/
--
replace_regex
/
A
/
C
/
/
B
/
D
/
i
/
3
/
2
/
/
2
/
1
/
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
# ----------------------------------------------------------------------------
# test for remove_file
# ----------------------------------------------------------------------------
--
error
1
--
exec
echo
"remove_file ;"
|
$MYSQL_TEST
2
>&
1
--
error
1
remove_file
non_existing_file
;
# ----------------------------------------------------------------------------
# test for write_file
# ----------------------------------------------------------------------------
--
error
1
--
exec
echo
"write_file ;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"write_file filename ;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"write_file filename
\"
;"
|
$MYSQL_TEST
2
>&
1
# ----------------------------------------------------------------------------
# test for file_exist
# ----------------------------------------------------------------------------
--
error
1
--
exec
echo
"file_exists ;"
|
$MYSQL_TEST
2
>&
1
--
error
0
,
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
--
error
1
file_exists
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
write_file
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
Content
for
test_file1
EOF
file_exists
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
--
error
1
file_exists
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
# ----------------------------------------------------------------------------
# test for copy_file
# ----------------------------------------------------------------------------
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
file1
.
tmp
file1
EOF
copy_file
$MYSQLTEST_VARDIR
/
tmp
/
file1
.
tmp
$MYSQLTEST_VARDIR
/
tmp
/
file2
.
tmp
;
file_exists
$MYSQLTEST_VARDIR
/
tmp
/
file2
.
tmp
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
file1
.
tmp
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
file2
.
tmp
;
--
error
1
--
exec
echo
"copy_file ;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"copy_file from_file;"
|
$MYSQL_TEST
2
>&
1
# ----------------------------------------------------------------------------
# test for perl
# ----------------------------------------------------------------------------
--
perl
print
"hello
\n
"
;
EOF
perl
;
print
"hello
\n
"
;
EOF
perl
;
# Print "hello"
print
"hello
\n
"
;
EOF
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment