diff options
author | Craig A. Berry <craigberry@mac.com> | 2003-04-17 12:18:19 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-19 06:54:34 +0000 |
commit | bfe0b8460c5710ac333ad9f60968a82600193679 (patch) | |
tree | ac97a21c2a7ff007c5d98613f0e3cf38472fe181 | |
parent | f4193312177189f6e5e8caee032cd298198ec91f (diff) | |
download | perl-bfe0b8460c5710ac333ad9f60968a82600193679.tar.gz |
readline.t tweak for VMS
From: "Craig A. Berry" <craigberry@mac.com>
Message-ID: <3E9F282B.6090603@mac.com>
p4raw-id: //depot/perl@19267
-rw-r--r-- | t/op/readline.t | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/t/op/readline.t b/t/op/readline.t index d127d583a5..80932c441d 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) { |