From bfe0b8460c5710ac333ad9f60968a82600193679 Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Thu, 17 Apr 2003 12:18:19 -0500 Subject: [PATCH] readline.t tweak for VMS From: "Craig A. Berry" Message-ID: <3E9F282B.6090603@mac.com> p4raw-id: //depot/perl@19267 --- t/op/readline.t | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/t/op/readline.t b/t/op/readline.t index d127d58..80932c4 100644 --- a/t/op/readline.t +++ b/t/op/readline.t @@ -20,21 +20,23 @@ like($@, 'Modification of a read-only value attempted', '[perl #19566]'); } # 82 is chosen to exceed the length for sv_grow in do_readline (80) -foreach my $k ('k', 'k'x82) { +foreach my $k (1, 82) { my $result = runperl (switches => '-l', stdin => '', stderr => 1, - prog => "%a = qw($k v); \$_ = <> foreach keys %a; print qw(end)", + prog => "\$x = q(k) x $k; \$a{\$x} = qw(v); \$_ = <> foreach keys %a; print qw(end)", ); - is ($result, "end", '[perl #21614] for length ' . length $k); + $result =~ s/\n\z// if $^O eq 'VMS'; + is ($result, "end", '[perl #21614] for length ' . length('k' x $k)); } -foreach my $k ('perl', 'perl'x21) { +foreach my $k (1, 21) { my $result = runperl (switches => '-l', stdin => ' rules', stderr => 1, - prog => "%a = qw($k v); foreach (keys %a) {\$_ .= <>; print}", + prog => "\$x = q(perl) x $k; \$a{\$x} = q(v); foreach (keys %a) {\$_ .= <>; print}", ); - is ($result, "$k rules", 'rcatline to shared sv for length ' . length $k); + $result =~ s/\n\z// if $^O eq 'VMS'; + is ($result, ('perl' x $k) . " rules", 'rcatline to shared sv for length ' . length('perl' x $k)); } foreach my $l (1, 82) { -- 2.7.4