1*f9e79facSMatthew Phillips# Test special parameter $? (exit status) in PS1 2*f9e79facSMatthew Phillipsoutput=$(PS1='status:$?:' ENV=/dev/null ${SH} +m -i </dev/null 2>&1) 3*f9e79facSMatthew Phillips# Should start with exit status 0 4*f9e79facSMatthew Phillipscase $output in 5*f9e79facSMatthew Phillips*status:\$?:*) echo "Exit status not expanded, got literal \$?"; exit 1 ;; 6*f9e79facSMatthew Phillips*status:0:*) exit 0 ;; 7*f9e79facSMatthew Phillips*) echo "Expected 'status:0:' in initial prompt"; exit 1 ;; 8*f9e79facSMatthew Phillipsesac 9