diff --git a/tools/regression/bin/sh/builtins/cd2.0 b/tools/regression/bin/sh/builtins/cd2.0 new file mode 100644 index 000000000000..eb8caf5dadaf --- /dev/null +++ b/tools/regression/bin/sh/builtins/cd2.0 @@ -0,0 +1,15 @@ +# $FreeBSD$ +set -e + +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +cd $T +D=$T +for i in 0 1 2 3 4 5 6 7 8 9; do + for j in 0 1 2 3 4 5 6 7 8 9; do + mkdir veryverylongdirectoryname + cd veryverylongdirectoryname + D=$D/veryverylongdirectoryname + done +done +[ $(pwd | wc -c) -eq $((${#D} + 1)) ] # +\n +rm -rf ${T}