From: Vincent Pit Date: Mon, 27 Jul 2009 16:21:14 +0000 (+0200) Subject: Really check that sysread(I, $x, 1, -4) dies with "Offset outside string" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dd61358a03a9af4566da18af61a95b264c7f9754;p=p5sagit%2Fp5-mst-13.2.git Really check that sysread(I, $x, 1, -4) dies with "Offset outside string" --- diff --git a/t/op/sysio.t b/t/op/sysio.t index c777afb..966a516 100644 --- a/t/op/sysio.t +++ b/t/op/sysio.t @@ -28,7 +28,7 @@ is($x, 'abc'); # should not be able to read before the buffer eval { sysread(I, $x, 1, -4) }; -is($x, 'abc'); +like($@, qr/^Offset outside string /); # $x should be intact is($x, 'abc');