Add test
This commit is contained in:
parent
3bda18ed9c
commit
dc05786693
1 changed files with 30 additions and 0 deletions
30
test/tests/shell-quiet.bash
Normal file
30
test/tests/shell-quiet.bash
Normal file
|
@ -0,0 +1,30 @@
|
|||
test_description='shell command can be suppressed in output'
|
||||
. '../test-lib.bash'
|
||||
|
||||
# when not quiet, expect to see command that was run
|
||||
test_expect_success 'run' '
|
||||
(run_dotbot | grep "echo banana") <<EOF
|
||||
- shell:
|
||||
- command: echo banana
|
||||
description: echoing a thing...
|
||||
EOF
|
||||
'
|
||||
|
||||
# when quiet, expect command to be suppressed
|
||||
test_expect_success 'run 2' '
|
||||
(run_dotbot | (! grep "echo banana")) <<EOF
|
||||
- shell:
|
||||
- command: echo banana
|
||||
description: echoing a thing...
|
||||
quiet: true
|
||||
EOF
|
||||
'
|
||||
|
||||
# when no description, expect to see command
|
||||
test_expect_success 'run 3' '
|
||||
(run_dotbot | grep "echo banana") <<EOF
|
||||
- shell:
|
||||
- command: echo banana
|
||||
quiet: true
|
||||
EOF
|
||||
'
|
Loading…
Reference in a new issue