[lang-ref] ( null_coalescing_alternative_1 ) ( bash )

@test "null coalescing alternative 1" {
	# x="${a-not set}"
	# Use default only if unset (empty counts as set).

	unset a
	x="${a-not set}"

	[ "$x" == "not set" ]

	a=""
	x="${a-not set}"
	[ "$x" == "" ]

	a="test"
	x="${a-not set}"
	[ "$x" = "test" ]
}