xref: /freebsd/bin/sh/tests/parser/ps1-expand2.0 (revision f9e79facf874567f25147b24863e5198164e8d04)
1*f9e79facSMatthew Phillips# Test braced variable expansion in PS1
2*f9e79facSMatthew Phillipstestvar=xyz123
3*f9e79facSMatthew Phillipsoutput=$(testvar=xyz123 PS1='prefix-${testvar}-suffix:' ENV=/dev/null ${SH} +m -i </dev/null 2>&1)
4*f9e79facSMatthew Phillipscase $output in
5*f9e79facSMatthew Phillips*xyz123*) exit 0 ;;
6*f9e79facSMatthew Phillips*) echo "Expected 'xyz123' in prompt output"; exit 1 ;;
7*f9e79facSMatthew Phillipsesac
8