From 23b14f50e346c7da08ea27b364aea740c5f71bdd Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 7 Mar 1999 16:06:33 +0000 Subject: Test for the actual feature. With help from Eli Zaretskii. --- tests/md5sum/newline-1 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tests/md5sum/newline-1') diff --git a/tests/md5sum/newline-1 b/tests/md5sum/newline-1 index 818e9fcfe..4ff544b74 100755 --- a/tests/md5sum/newline-1 +++ b/tests/md5sum/newline-1 @@ -5,14 +5,25 @@ case "$PERL" in *'missing perl') - echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test" + echo 1>&2 "$0: configure didn't find a usable version of Perl," \ + " so can't run this test" exit 77 ;; esac -if test -n "$COMSPEC$ComSpec"; then - # DOS/Windows - echo 1>&2 "$0: This test would always fail on MSDOS/Window systems" +# See if we can create a filename that contains a newline. +# Be careful to do it in a subshell so that we can redirect the +# error output if it fails. +(> 'a +b') 2> /dev/null \ + && filename_may_contain_newline=yes \ + || filename_may_contain_newline=no +rm -f 'a +b' + +if test $filename_may_contain_newline = no; then + echo 1>&2 "$0: can't create newline-containing file name," \ + "so can't run this test" exit 77 fi -- cgit v1.2.3-70-g09d2