mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Adding auxiliary scripts that allow to display messages in result files from within test files
- show_msg.inc - displays a message followed by a line of '-' at the length of the messgae - show_msg80.inc - displays a message followed by a line of '-' with a fixed length of 80 mysql-test/r/mysqltest.result: Updated result file mysql-test/t/mysqltest.test: Added test cases to test the show_msg.inc and show_msg80.inc auxiliary files BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
19
mysql-test/include/show_msg.inc
Executable file
19
mysql-test/include/show_msg.inc
Executable file
@ -0,0 +1,19 @@
|
||||
#### include/show_msg.inc
|
||||
#
|
||||
# This file writes the value set in @message into the
|
||||
# a protocol file as part of executing a test sequence
|
||||
#
|
||||
# Usage:
|
||||
# Add the following to any *.test file:
|
||||
# :
|
||||
# set @message="This is a message example";
|
||||
# --source include/show_msg.inc
|
||||
# :
|
||||
#
|
||||
|
||||
--disable_query_log
|
||||
SET @utf8_message = CONVERT(@message using utf8);
|
||||
select @utf8_message as ""
|
||||
union
|
||||
select repeat(CONVERT('-' using utf8),char_length(@utf8_message));
|
||||
--enable_query_log
|
23
mysql-test/include/show_msg80.inc
Executable file
23
mysql-test/include/show_msg80.inc
Executable file
@ -0,0 +1,23 @@
|
||||
#### include/show_msg80.inc
|
||||
#
|
||||
# This file writes the value set in @message into the
|
||||
# a protocol file as part of executing a test sequence
|
||||
# with a dash line that is fixed on 80 characters.
|
||||
# This can be used in the case of long messages,
|
||||
# multi line messages that exceed 80 or if an 80 char
|
||||
# line is desired for short messages.
|
||||
#
|
||||
# Usage:
|
||||
# Add the following to any *.test file:
|
||||
# :
|
||||
# set @message="This is a message example";
|
||||
# --source include/show_msg80.inc
|
||||
# :
|
||||
#
|
||||
|
||||
--disable_query_log
|
||||
SET @utf8_message = CONVERT(@message using utf8);
|
||||
select @utf8_message as ""
|
||||
union
|
||||
select repeat(CONVERT('-' using utf8),80);
|
||||
--enable_query_log
|
@ -148,3 +148,17 @@ a'b a"b
|
||||
select 'aaa\\','aa''a',"aa""a";
|
||||
aaa\ aa'a aa"a
|
||||
aaa\ aa'a aa"a
|
||||
SET @message = 'Here comes a message';
|
||||
|
||||
Here comes a message
|
||||
--------------------
|
||||
SET @message = USER();
|
||||
|
||||
root@localhost
|
||||
--------------
|
||||
SET @message = 'Here comes a very very long message that is longer then 80 characters
|
||||
on multiple lines';
|
||||
|
||||
Here comes a very very long message that is longer then 80 characters
|
||||
on multiple lines
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -295,3 +295,23 @@ select 1 as `a'b`, 2 as `a"b`;
|
||||
|
||||
# Test escaping of quotes
|
||||
select 'aaa\\','aa''a',"aa""a";
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Check of include/show_msg.inc
|
||||
#
|
||||
|
||||
# The message contains in most cases a string with the default character set
|
||||
SET @message = 'Here comes a message';
|
||||
--source include/show_msg.inc
|
||||
|
||||
# The message could also contain a string with character set utf8
|
||||
SET @message = USER();
|
||||
--source include/show_msg.inc
|
||||
|
||||
# The message contains more then 80 characters on multiple lines
|
||||
SET @message = 'Here comes a very very long message that is longer then 80 characters
|
||||
on multiple lines';
|
||||
--source include/show_msg80.inc
|
||||
|
||||
|
Reference in New Issue
Block a user