Test for debug mode

This commit is contained in:
Benjamin Sago 2017-08-19 13:57:56 +01:00
parent 1081762657
commit 80e3d6fcaf
2 changed files with 11 additions and 1 deletions

2
xtests/debug Normal file
View File

@ -0,0 +1,2 @@
DEBUG:exa::fs::file: Statting file "/testcases/attributes/dirs/no-xattrs_empty"
INFO:exa::fs::dir: Reading directory "/testcases/attributes/dirs/no-xattrs_empty"

View File

@ -17,7 +17,10 @@ results="/vagrant/xtests"
# We want to use strict mode here. Its important that no combination of
# testing flags happens to work by accident!
export EXA_STRICT=1
export EXA_STRICT="1"
# We also dont want to see reams and reams of debug output.
export EXA_DEBUG=""
# Check that no files were created more than a year ago.
@ -188,6 +191,11 @@ $exa --time 2>&1 | diff -q - $results/error_value || exit 1
$exa --long=time 2>&1 | diff -q - $results/error_overvalued || exit 1
# Debug mode
# (uses an empty directory so it prints nothing to stdout)
EXA_DEBUG="1" $exa $testcases/attributes/dirs/no-xattrs_empty -lh 2>&1 | diff -q - $results/debug || exit 1
# And finally...
$exa --help | diff -q - $results/help || exit 1
$exa --help --long | diff -q - $results/help_long || exit 1