From bd1869dca4d5c5a05da6fe5ec612a3f53b18c6ea Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 6 Mar 2011 21:25:47 +0000 Subject: [PATCH] Tidy t/io/crlf.t Skip a test under minitest using skip_if_miniperl(). Use eq(), like() and unlike() where appropriate, instead of ok(). --- t/io/crlf.t | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/t/io/crlf.t b/t/io/crlf.t index 4c97a91..7eb9a78 100644 --- a/t/io/crlf.t +++ b/t/io/crlf.t @@ -29,8 +29,7 @@ if (find PerlIO::Layer 'perlio') { SKIP: { - skip("miniperl can't rely on loading PerlIO::scalar") - if $ENV{PERL_CORE_MINITEST}; + skip_if_miniperl("miniperl can't rely on loading PerlIO::scalar"); skip("no PerlIO::scalar") unless $Config{extensions} =~ m!\bPerlIO/scalar\b!; require PerlIO::scalar; my $fcontents = join "", map {"$_\015\012"} "a".."zzz"; @@ -41,7 +40,7 @@ if (find PerlIO::Layer 'perlio') { seek $fh, $pos, 0; $/ = "\n"; $s = <$fh>.<$fh>; - ok($s eq "\nxxy\n"); + is($s, "\nxxy\n"); } ok(close(FOO)); @@ -66,8 +65,8 @@ if (find PerlIO::Layer 'perlio') { close FOO; print join(" ", "#", map { sprintf("%02x", $_) } unpack("C*", $foo)), "\n"; - ok($foo =~ /\x0d\x0a$/); - ok($foo !~ /\x0d\x0d/); + like($foo, qr/\x0d\x0a$/); + unlike($foo, qr/\x0d\x0d/); } } } -- 2.7.4