_execute_: add NOTICE option

This commit is contained in:
Nathaniel Landau
2021-09-09 08:47:17 -04:00
parent e8e9d51f9d
commit dabceb11b2

View File

@@ -148,6 +148,15 @@ _testExecute_() {
assert_file_not_exist "testfile.txt" 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" { @test "_execute_ -ev: Good command" {
touch "testfile.txt" touch "testfile.txt"
run _execute_ -ve "rm -v testfile.txt" run _execute_ -ve "rm -v testfile.txt"