summaryrefslogtreecommitdiff
path: root/test/tests/shell-quiet.bash
blob: a69f6c56c3b2130d6649c74bd0bbef99bcd9169e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
'