From: Peter Rabbitson Date: Thu, 2 Feb 2012 17:43:36 +0000 (+0100) Subject: Rename basic testfile and add extra test X-Git-Tag: v0.02~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-PeekPoke.git;a=commitdiff_plain;h=28dc72714c455c652191ed4e2d25173fa8f9af19 Rename basic testfile and add extra test --- diff --git a/t/basic.t b/t/01basic.t similarity index 91% rename from t/basic.t rename to t/01basic.t index 3d951f4..895b2df 100644 --- a/t/basic.t +++ b/t/01basic.t @@ -16,6 +16,9 @@ is( peek($str_pv_addr, $len + 1), $str . "\0", 'peek as expected (with NUL termi is( poke($str_pv_addr+5, 'itig'), 4, 'poke success and correct RV' ); is( $str, 'for mitigation and mayhem', 'original changed' ); +is( poke($str_pv_addr+1, 'u'), 1, 'second poke success and correct RV' ); +is( $str, 'fur mitigation and mayhem', 'original changed again' ); + my $addr = do { no warnings 'portable'; hex('DEADBEEF' x (PTR_SIZE/4)) }; is( poke_address ($str_pv_addr, $addr), PTR_SIZE, 'poke_address works and correct RV' ); is( peek_address ($str_pv_addr), $addr, 'peek_address works' );