Changeset 1490f1 for t/magic.t


Ignore:
Timestamp:
04/06/10 00:04:48 (2 years ago)
Author:
Tomash Brechko <tomash.brechko@…>
Branches:
master
Children:
6cff0c
Parents:
24f8cd
git-author:
Tomash Brechko <tomash.brechko@…> (04/06/10 00:04:48)
git-committer:
Tomash Brechko <tomash.brechko@…> (04/06/10 00:04:48)
Message:

Readonly may be absent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • t/magic.t

    re2906f r1490f1  
    5353ok(exists $memd->get_multi($scalar2)->{$scalar2}); 
    5454 
     55SKIP: { 
     56    eval { require Readonly }; 
     57    skip "Skipping Readonly tests because the module is not present", 3 
     58      if $@; 
    5559 
    56 use Readonly; 
    57 Readonly my $expires => 3; 
     60    # 'require Readonly' as above can be used to test if the module is 
     61    # present, but won't actually work.  So below we 'use Readonly', 
     62    # but in a string eval. 
     63    eval q{ 
     64        use Readonly; 
    5865 
    59 Readonly my $key2 => "ТретОй.ключ"; 
    60 ok($memd->set($key2, $key2, $expires)); 
    61 ok(exists $memd->get_multi($key2)->{$key2}); 
    62 sleep(4); 
    63 ok(! exists $memd->get_multi($key2)->{$key2}); 
     66        Readonly my $expires => 3; 
     67 
     68        Readonly my $key2 => "ТретОй.ключ"; 
     69        ok($memd->set($key2, $key2, $expires)); 
     70        ok(exists $memd->get_multi($key2)->{$key2}); 
     71        sleep(4); 
     72        ok(! exists $memd->get_multi($key2)->{$key2}); 
     73    }; 
     74} 
Note: See TracChangeset for help on using the changeset viewer.