Show
Ignore:
Timestamp:
03/30/08 23:11:59 (7 years ago)
Author:
daisuke
Message:

lang/perl/Cache-Memcached-libmemcached; make sure to check actual operations under no_block mode

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Cache-Memcached-libmemcached/trunk/t/14_no_block.t

    r5721 r8523  
    77        plan(skip_all => "Define MEMCACHED_SERVER (e.g. localhost:11211) to run this test"); 
    88    } else { 
    9         plan(tests => 7); 
     9        plan(tests => 9); 
    1010    } 
    1111    use_ok("Cache::Memcached::libmemcached"); 
     
    2222    $cache->set_no_block(1); 
    2323    ok( $cache->is_no_block ); 
     24 
     25    my $value = "non-block via accessor"; 
     26    $cache->remove(__FILE__); 
     27    $cache->set(__FILE__, $value); 
     28 
     29    is($cache->get(__FILE__), $value); 
    2430} 
    2531 
     
    3541    $cache->set_no_block(0); 
    3642    ok( !$cache->is_no_block ); 
     43 
     44    my $value = "non-block via constructor"; 
     45    $cache->remove(__FILE__); 
     46    $cache->set(__FILE__, $value); 
     47 
     48    is($cache->get(__FILE__), $value); 
    3749} 
    3850