]> diplodocus.org Git - nmh/blobdiff - test/whatnow/test-cd
For the autoconf/automake stuff to replace getline, the following
[nmh] / test / whatnow / test-cd
index 8b01ab6c1d3e107e5323832e88481c88e180d170..e5111bddefd9eb498f7b7842e4c750b9a3f414a9 100755 (executable)
@@ -37,13 +37,17 @@ actual=$MH_TEST_DIR/$$.actual
 set +e
 whatnowtest=`echo cd | whatnow -prompt ''`
 set -e
-
 case ${whatnowtest} in
     cd) cat > "$expected" <<EOF
 cd ${MH_TEST_DIR}/foo\'s\ bar
 pwd
 $SPDIR
 EOF
+    # If path to $SPDIR is too long, readline will wrap and disturb
+    # the actual output.  It obeys COLUMNS, so set that to a value
+    # that should be longer that $SPDIR plus a bit more.
+    COLUMNS=`getconf PATH_MAX . 2>/dev/null`  ||  COLUMNS=8192
+    export COLUMNS
     ;;
     "") cat > "$expected" <<EOF
 $SPDIR