From 5d303573c73a10d95e9b986fbd37ebb35644fd0a Mon Sep 17 00:00:00 2001 From: Avogar Date: Tue, 8 Sep 2020 16:06:05 +0300 Subject: [PATCH] Add tests --- .../0_stateless/01474_custom_null_tsv.reference | 1 + tests/queries/0_stateless/01474_custom_null_tsv.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/queries/0_stateless/01474_custom_null_tsv.reference create mode 100644 tests/queries/0_stateless/01474_custom_null_tsv.sh diff --git a/tests/queries/0_stateless/01474_custom_null_tsv.reference b/tests/queries/0_stateless/01474_custom_null_tsv.reference new file mode 100644 index 00000000000..c1e23d80b03 --- /dev/null +++ b/tests/queries/0_stateless/01474_custom_null_tsv.reference @@ -0,0 +1 @@ +MyNull diff --git a/tests/queries/0_stateless/01474_custom_null_tsv.sh b/tests/queries/0_stateless/01474_custom_null_tsv.sh new file mode 100644 index 00000000000..1078f4431e0 --- /dev/null +++ b/tests/queries/0_stateless/01474_custom_null_tsv.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. "$CURDIR"/../shell_config.sh + +$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS tsv_custom_null"; +$CLICKHOUSE_CLIENT --query="CREATE TABLE regexp (id Nullable(UInt32)) ENGINE = Memory"; + +$CLICKHOUSE_CLIENT --query="INSERT INTO tsv_custom_null VALUES (NULL)"; + +$CLICHHOUSE_CLIENT --output_format_tsv_null_representation='MyNull' --query="SELECT * FROM tsv_custom_null FORMAT TSV"; + +$CLICKHOUSE_CLIENT --query="DROP TABLE tsv_custom_null"; +