From: Jim Meyering Date: Mon, 14 Jan 2002 08:52:45 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: TEXTUTILS-2_0_20~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b00199bd9b9c3605859083c816c6c59a84404ca1;p=thirdparty%2Fcoreutils.git *** empty log message *** --- diff --git a/old/textutils/NEWS b/old/textutils/NEWS index af2016d45a..95e2a3d349 100644 --- a/old/textutils/NEWS +++ b/old/textutils/NEWS @@ -1,5 +1,6 @@ Changes in release 2.1 [2.0.20] +* sort -m no longer segfaults when given an empty file * sort -S now accepts 'K' as a synonym for 'k'. * wc recognizes all locale-defined white-space characters, not just those in the "C" locale. diff --git a/tests/misc/sort b/tests/misc/sort new file mode 100755 index 0000000000..06cf6ace78 --- /dev/null +++ b/tests/misc/sort @@ -0,0 +1,33 @@ +#!/bin/sh + +: ${PERL=perl} +: ${srcdir=.} + +case "$PERL" in + *'missing perl') + echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test" + exit 77 + ;; +esac + +exec $PERL -w -I$srcdir/.. -MFetish -- - <<\EOF +require 5.003; +use strict; + +(my $program_name = $0) =~ s|.*/||; + +# Turn off localisation of executable's ouput. +@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + +my @Tests = + ( + ['m1', '-m', {IN=> {empty=> ''}}, {IN=> {f=> "foo\n"}}, {OUT=>"foo\n"}], + ); + +my $save_temps = $ENV{DEBUG}; +my $verbose = $ENV{VERBOSE}; + +my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; +my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); +exit $fail; +EOF