diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1997-11-26 01:50:37 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1997-11-26 01:50:37 +0000 |
commit | 15f0808c5d67b362ecb8b59cf6a3ed61fbf51bbf (patch) | |
tree | ff177e068b02c6f2f8b1eae3627b3eb4459640e0 /t | |
parent | 0e4ced382cb959db083cda30b8dbdae68933842a (diff) | |
download | perl-15f0808c5d67b362ecb8b59cf6a3ed61fbf51bbf.tar.gz |
[win32] Fix for C<sort 'foo'...> bug:
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Message-Id: <199711011946.OAA18882@aatma.engin.umich.edu>
Subject: [PATCH] Re: Sort grammar bug
Date: Sat, 01 Nov 1997 14:46:35 -0500
------
From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
Message-Id: <199711021247.MAA01743@crypt.compulink.co.uk>
Subject: Re: Sort grammar bug
Date: Sun, 02 Nov 1997 12:47:51 +0000
p4raw-id: //depot/win32/perl@312
Diffstat (limited to 't')
-rwxr-xr-x | t/op/sort.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/op/sort.t b/t/op/sort.t index c792bbb48e..a6829e01e4 100755 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -2,7 +2,7 @@ # $RCSfile: sort.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:24 $ -print "1..19\n"; +print "1..21\n"; sub backwards { $a lt $b ? 1 : $a gt $b ? -1 : 0 } @@ -91,3 +91,14 @@ print ($@ =~ /redefine active sort/ ? "ok 18\n" : "not ok 18\n"); }; eval { @b = sort twoface 4,1 }; print $@ ? "$@" : "not ok 19\n"; + +eval <<'CODE'; + my @result = sort main'backwards 'one', 'two'; +CODE +print $@ ? "not ok 20\n# $@" : "ok 20\n"; + +eval <<'CODE'; + # "sort 'one', 'two'" should not try to parse "'one" as a sort sub + my @result = sort 'one', 'two'; +CODE +print $@ ? "not ok 21\n# $@" : "ok 21\n"; |