[lang-ref] ( null_coalescing ) ( bash )
@test "null coalescing" {
# x="${a:-not set}"
# Use default if unset or empty.
unset a
x="${a:-not set}"
[ "$x" == "not set" ]
a=""
x="${a:-not set}"
[ "$x" == "not set" ]
a="test"
x="${a:-not set}"
[ "$x" = "test" ]
}