From a8c93853467ae4e8619f0e6770f098a267352e87 Mon Sep 17 00:00:00 2001 From: Mikhail Korotov Date: Mon, 3 Feb 2020 10:57:52 +0300 Subject: [PATCH] Test added --- ..._format.reference => 01073_crlf_end_of_line.reference} | 4 ++++ dbms/tests/queries/0_stateless/01073_crlf_end_of_line.sql | 8 ++++++++ .../0_stateless/01073_crlf_in_output_csv_format.sql | 8 -------- 3 files changed, 12 insertions(+), 8 deletions(-) rename dbms/tests/queries/0_stateless/{01073_crlf_in_output_csv_format.reference => 01073_crlf_end_of_line.reference} (52%) create mode 100755 dbms/tests/queries/0_stateless/01073_crlf_end_of_line.sql delete mode 100755 dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sql diff --git a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference b/dbms/tests/queries/0_stateless/01073_crlf_end_of_line.reference similarity index 52% rename from dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference rename to dbms/tests/queries/0_stateless/01073_crlf_end_of_line.reference index cfa75cccc55..caade7612e2 100644 --- a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference +++ b/dbms/tests/queries/0_stateless/01073_crlf_end_of_line.reference @@ -2,3 +2,7 @@ 2,"world" 1,"hello" 2,"world" +1 hello +2 world +1 hello +2 world diff --git a/dbms/tests/queries/0_stateless/01073_crlf_end_of_line.sql b/dbms/tests/queries/0_stateless/01073_crlf_end_of_line.sql new file mode 100755 index 00000000000..3a2fc30caaa --- /dev/null +++ b/dbms/tests/queries/0_stateless/01073_crlf_end_of_line.sql @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS test_01073_crlf_end_of_line; +CREATE TABLE test_01073_crlf_end_of_line (value UInt8, word String) ENGINE = MergeTree() ORDER BY value; +INSERT INTO test_01073_crlf_end_of_line VALUES (1, 'hello'), (2, 'world'); +SELECT * FROM test_01073_crlf_end_of_line FORMAT CSV SETTINGS output_format_csv_crlf_end_of_line = 1; +SELECT * FROM test_01073_crlf_end_of_line FORMAT CSV SETTINGS output_format_csv_crlf_end_of_line = 0; +SELECT * FROM test_01073_crlf_end_of_line FORMAT TSV SETTINGS output_format_tsv_crlf_end_of_line = 1; +SELECT * FROM test_01073_crlf_end_of_line FORMAT TSV SETTINGS output_format_tsv_crlf_end_of_line = 0; +DROP TABLE IF EXISTS test_01073_crlf_end_of_line; diff --git a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sql b/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sql deleted file mode 100755 index 083ac30cb45..00000000000 --- a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS test_01073_crlf_in_output_csv_format; -CREATE TABLE test_01073_crlf_in_output_csv_format (value UInt8, word String) ENGINE = MergeTree() ORDER BY value; -INSERT INTO test_01073_crlf_in_output_csv_format VALUES (1, 'hello'), (2, 'world'); -SET output_format_csv_crlf_end_of_line = 1; -SELECT * FROM test_01073_crlf_in_output_csv_format FORMAT CSV; -SET output_format_csv_crlf_end_of_line = 0; -SELECT * FROM test_01073_crlf_in_output_csv_format FORMAT CSV; -DROP TABLE IF EXISTS test_01073_crlf_in_output_csv_format;