Fix tests so they actually test $@. like() demands a qr//.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 28 Jun 2007 15:05:42 +0000 (15:05 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 28 Jun 2007 15:05:42 +0000 (15:05 +0000)
p4raw-id: //depot/perl@31493

t/op/vec.t

index b59eafb..4ca23f1 100755 (executable)
@@ -43,16 +43,16 @@ ok("$foo $bar $baz" eq "1 2 3");
 # error cases
 
 $x = eval { vec $foo, 0, 3 };
-like($@, /^Illegal number of bits in vec/);
+like($@, qr/^Illegal number of bits in vec/);
 $@ = undef;
 $x = eval { vec $foo, 0, 0 };
-like($@, /^Illegal number of bits in vec/);
+like($@, qr/^Illegal number of bits in vec/);
 $@ = undef;
 $x = eval { vec $foo, 0, -13 };
-like($@, /^Illegal number of bits in vec/);
+like($@, qr/^Illegal number of bits in vec/);
 $@ = undef;
 $x = eval { vec($foo, -1, 4) = 2 };
-like($@, /^Illegal number of bits in vec/);
+like($@, qr/^Negative offset to vec in lvalue context/);
 $@ = undef;
 ok(! vec('abcd', 7, 8));