From 80d5dd5fdbe8770363207af414851d8919d5f681 Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Sat, 21 Nov 2009 14:54:35 +0000 Subject: [PATCH] Add a test for r199631. --- tools/regression/bin/sh/builtins/cd2.0 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tools/regression/bin/sh/builtins/cd2.0 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}