Add test for --help. [#CLICKHOUSE-3713]

This commit is contained in:
Vitaliy Lyudvichenko 2018-04-24 13:40:03 +03:00 committed by alexey-milovidov
parent b4025e312e
commit 990bcbb007

View File

@ -60,4 +60,19 @@ ${CLICKHOUSE_LOCAL} -q "CREATE TABLE sophisticated_default
) ENGINE = Memory; SELECT count() FROM system.tables WHERE name='sophisticated_default';"
# Help is not skipped
[[ `${CLICKHOUSE_LOCAL} --help 2>&1 | wc -l` > 100 ]]
[[ `${CLICKHOUSE_LOCAL} --help | wc -l` > 100 ]]
# Check that help width is adaptive
stty cols 99999
rows1=`${CLICKHOUSE_LOCAL} --help | wc -l`
stty cols 80
rows2=`${CLICKHOUSE_LOCAL} --help | wc -l`
[[ $rows1 < $rows2 ]]
stty cols 99999
rows1=`${CLICKHOUSE_CLIENT} --help | wc -l`
stty cols 80
rows2=`${CLICKHOUSE_CLIENT} --help | wc -l`
[[ $rows1 < $rows2 ]]
shopt -s checkwinsize || true