ClickHouse/tests/queries/0_stateless/02712_bool_better_exception_message.sh
Alexey Milovidov 8e90b7d446 Fixup
2023-04-10 03:31:53 +02:00

25 lines
687 B
Bash
Executable File

#!/usr/bin/env bash
# Tags: no-fasttest
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
$CLICKHOUSE_LOCAL <<END
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": 1}');
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": null}');
END
$CLICKHOUSE_LOCAL <<END 2>&1 | rg -Fc "'w' character"
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": wtf}');
END
$CLICKHOUSE_LOCAL <<END 2>&1 | rg -Fc "expected 'false'"
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": ftw}');
END
$CLICKHOUSE_LOCAL <<END 2>&1 | rg -Fc "'{' character"
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": {}}');
END