summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnish Athalye <me@anishathalye.com>2018-11-21 19:50:46 -0500
committerAnish Athalye <me@anishathalye.com>2018-11-21 19:50:46 -0500
commit5e2d40939e567a68eb8f4eecc23752df6f183664 (patch)
tree249a18e202fd1a86fd24841a10db8210d9dfd003 /test
parent8558a5dca0232879c95243747f94a2bf7b8869e4 (diff)
parentdc057866935db382d3be8559d7079b122235ff51 (diff)
Merge branch 'thtliife/suppress-shell-cmd'
Diffstat (limited to 'test')
-rw-r--r--test/tests/shell-quiet.bash30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/tests/shell-quiet.bash b/test/tests/shell-quiet.bash
new file mode 100644
index 0000000..a69f6c5
--- /dev/null
+++ b/test/tests/shell-quiet.bash
@@ -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
+'