test: add test for checking if commands mans lengths are shorter than 80

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent 2317ced4
......@@ -88,6 +88,20 @@ test_expect_failure "All ipfs root commands are mentioned in base helptext" '
fi
'
test_expect_failure "All ipfs commands docs are 80 columns or less" '
echo 0 > fail
while read cmd
do
LENGTH="$($cmd --help | awk "{ print length }" | sort -nr | head -1)"
[ $LENGTH -gt 80 ] &&
{ echo "$cmd" help text is longer than 79 chars "($LENGTH)"; echo 1 > fail; }
done <commands.txt
if [ $(cat fail) = 1 ]; then
return 1
fi
'
test_expect_success "'ipfs commands --flags' succeeds" '
ipfs commands --flags >commands.txt
'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment