From 96c07ae7758646fdb5a0eaa94e81ad2a7b579efe Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 11 Jan 2012 16:39:22 -0800 Subject: test for the error code, not the full message bad practice. --- t/slabs_reassign.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/slabs_reassign.t b/t/slabs_reassign.t index aac83fc..f06b0dc 100644 --- a/t/slabs_reassign.t +++ b/t/slabs_reassign.t @@ -54,12 +54,12 @@ ok($slabs_before->{"25:total_pages"} != $slabs_after->{"25:total_pages"}, # Try to move another slab, see that it complains print $sock "slabs reassign 31 25\r\n"; -is(scalar <$sock>, "NOTFULL dest class has spare memory\r\n", "Cannot re-run against class with empty space"); +like(scalar <$sock>, qr/^NOTFULL/, "Cannot re-run against class with empty space"); # Try to move a page backwards. Should complain that source class isn't "safe" # to move from. print $sock "slabs reassign 25 31\r\n"; -is(scalar <$sock>, "UNSAFE src class is in an unsafe state\r\n", "Cannot move an unsafe slab back"); +like(scalar <$sock>, qr/^UNSAFE/, "Cannot move an unsafe slab back"); # Try to insert items into both slabs print $sock "set bfoo51 0 0 70000\r\n", $bigdata, "\r\n"; -- cgit v1.2.1