Add test for debug.all config option

This commit is contained in:
Andrew Bettison 2012-05-15 09:49:40 +09:30
parent d11258cefc
commit cecb09f46a

View File

@ -133,7 +133,7 @@ test_DotsInNames() {
assertStdoutGrep --stdout --stderr --matches=1 '^foo\.x\.bar=yes$' assertStdoutGrep --stdout --stderr --matches=1 '^foo\.x\.bar=yes$'
} }
doc_DebugFlags="Debug flags affect verbosity" doc_DebugFlags="Debug config options affect verbosity"
test_DebugFlags() { test_DebugFlags() {
executeOk $dna echo one two three executeOk $dna echo one two three
assertStderrGrep --matches=0 '\<echo:argv\[' assertStderrGrep --matches=0 '\<echo:argv\['
@ -145,4 +145,20 @@ test_DebugFlags() {
assertStderrGrep --matches=0 '\<echo:argv\[' assertStderrGrep --matches=0 '\<echo:argv\['
} }
doc_DebugFlagAll="Debug config options override debug.all"
test_DebugFlagAll() {
executeOk $dna config set debug.all yes
executeOk $dna echo one two three
assertStderrGrep --matches=3 '\<echo:argv\['
executeOk $dna config set debug.verbose false
executeOk $dna echo one two three
assertStderrGrep --matches=0 '\<echo:argv\['
executeOk $dna config set debug.verbose true
executeOk $dna echo one two three
assertStderrGrep --matches=3 '\<echo:argv\['
executeOk $dna config set debug.all off
executeOk $dna echo one two three
assertStderrGrep --matches=3 '\<echo:argv\['
}
runTests "$@" runTests "$@"