false case scenario

This commit is contained in:
pvincent
2026-07-18 00:50:56 +04:00
parent 43f28765a9
commit 89f2bece87
3 changed files with 86 additions and 58 deletions
+15 -2
View File
@@ -7,6 +7,19 @@ readonly BASEDIR
# SCENARII
function do_pipe_error {
declare -A associative
associative['A']='Abc'
[[ -v associative['A'] ]] && echo "${associative['A']}"
true
}
function do_false {
echo before false
false
echo after false
}
function do_success {
echo -n 'SUCCESS args=['
(
@@ -17,8 +30,8 @@ function do_success {
source "${MIAOU_BASH_DIR}/lib/ansi.bash"
local content
content=$(PADDING_LEFT=2 PADDING_RIGHT=6 style_padding 'this is success')
content=$(FG=PURPLE style_ansi "$content")
BG=RED PADDING=8 style_block "$content"
content=$(FG=PURPLE BG=GRAY style_ansi "$content")
FG=BLACK BG=RED PADDING=8 style_block "$content"
}
function do_unbound_variable {