From dabceb11b247531b6ba34708cefed4e259128580 Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Thu, 9 Sep 2021 08:47:17 -0400 Subject: [PATCH] _execute_: add NOTICE option --- test/baseHelpers.bats | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/baseHelpers.bats b/test/baseHelpers.bats index deb2b3c..ee0e9e0 100755 --- a/test/baseHelpers.bats +++ b/test/baseHelpers.bats @@ -148,6 +148,15 @@ _testExecute_() { assert_file_not_exist "testfile.txt" } + @test "_execute_ -n: Good command" { + touch "testfile.txt" + run _execute_ -n "rm -v testfile.txt" + + assert_success + assert_line --index 0 --partial "[ notice] rm -v testfile.txt" + assert_file_not_exist "testfile.txt" + } + @test "_execute_ -ev: Good command" { touch "testfile.txt" run _execute_ -ve "rm -v testfile.txt"