xref: /freebsd/bin/sh/tests/parser/ps1-expand5.0 (revision 8ccc0d235c226d84112561d453c49904398d085c)
1# Test positional parameter $0 in PS1
2output=$(PS1='shell:$0:' ENV=/dev/null ${SH} +m -i </dev/null 2>&1)
3# $0 should contain the shell name/path
4case $output in
5*shell:\$0:*) echo "Positional parameter not expanded, got literal \$0"; exit 1 ;;
6*shell:*sh*:*) exit 0 ;;
7*) echo "Expected shell name after 'shell:' in output"; exit 1 ;;
8esac
9