summaryrefslogtreecommitdiff
path: root/test/integration/test-00-commands-have-help
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-11-18 03:48:59 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2017-11-19 18:26:19 +0100
commit3f8664036e63d2a2d58120ab6c1e8a0a09937c71 (patch)
tree492e0eddd4d4555293f092eb1c21ecb3dad2bbf7 /test/integration/test-00-commands-have-help
parent7fba4e0df1768703ce657d8bf8200472c2dd825f (diff)
support COLUMNS environment variable in apt tools
apt usually gets the width of the window from the terminal or failing that has a default value, but especially for testing it can be handy to control the size as you can't be sure that variable sized content will always be linebreaked as expected in the testcases.
Diffstat (limited to 'test/integration/test-00-commands-have-help')
-rwxr-xr-xtest/integration/test-00-commands-have-help13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/integration/test-00-commands-have-help b/test/integration/test-00-commands-have-help
index 2d8fa1105..4a0cc64d4 100755
--- a/test/integration/test-00-commands-have-help
+++ b/test/integration/test-00-commands-have-help
@@ -86,3 +86,16 @@ testmoo '@1484822790' 'Have you mooed today?'
testmoo '@1484822791' 'Have you mooed today?'
testmoo '@1484822792' 'Have you mooed today?'
testmoo '@1484822793' 'Have you mooed today?'
+
+# that also helps with reproducibility of output…
+export COLUMNS=80
+testsuccess aptget moo
+export COLUMNS=0
+testwarning aptget moo
+export COLUMNS=80a
+testwarning aptget moo
+export COLUMNS=a80
+testwarning aptget moo
+export COLUMNS=
+testwarning aptget moo
+unset COLUMNS