diff --git a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference b/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference index 2c94e483710..cfa75cccc55 100644 --- a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference +++ b/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.reference @@ -1,2 +1,4 @@ -OK -OK +1,"hello" +2,"world" +1,"hello" +2,"world" diff --git a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sh b/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sh deleted file mode 100755 index 5fa8101c815..00000000000 --- a/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -. $CURDIR/../shell_config.sh - -${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS test_01073_crlf_in_output_csv_format;" -${CLICKHOUSE_CLIENT} --query "CREATE TABLE test_01073_crlf_in_output_csv_format (value UInt8, word String) ENGINE = MergeTree() ORDER BY value;" -${CLICKHOUSE_CLIENT} --query "INSERT INTO test_01073_crlf_in_output_csv_format VALUES (1, 'hello'), (2, 'world');" - -if [[ `${CLICKHOUSE_CLIENT} --output_format_csv_crlf_end_of_line=0 --query "SELECT * FROM test_01073_crlf_in_output_csv_format FORMAT CSV;"`="1,\"hello\"\n2,\"world\"\n" ]]; then - echo "OK" -else - echo "WA" -fi - -if [[ `${CLICKHOUSE_CLIENT} --output_format_csv_crlf_end_of_line=1 --query "SELECT * FROM test_01073_crlf_in_output_csv_format FORMAT CSV;"`="1,\"hello\"\r\n2,\"world\"\r\n" ]]; then - echo "OK" -else - echo "WA" -fi - -${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS test_01073_crlf_in_output_csv_format;" - 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 new file mode 100755 index 00000000000..f6c290eb64a --- /dev/null +++ b/dbms/tests/queries/0_stateless/01073_crlf_in_output_csv_format.sql @@ -0,0 +1,9 @@ +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; +