Ignore:
Timestamp:
08/13/15 18:07:55 (9 years ago)
Author:
nanardon
Message:

add yesno() function for configutration option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/t/05_utils.t

    r1216 r1378  
    11use strict; 
    22use warnings; 
    3 use Test::More tests => 16; 
     3use Test::More tests => 21; 
    44use File::Temp qw(mkstemp); 
    55 
     
    4444ok(LATMOS::Accounts::Utils::check_ug_validity('5toto'), '"5toto" is invalid username'); 
    4545ok(!LATMOS::Accounts::Utils::check_ug_validity('t5oto'), '"t5oto" is valid username'); 
     46 
     47is(yesno('yes'),  1, 'yes is true'); 
     48is(yesno('true'), 1, 'true is true'); 
     49is(yesno('23'),   1, '23 is true'); 
     50is(yesno('no'),   0, 'no is false'); 
     51is(yesno('what'), 'what', 'what is what?'); 
Note: See TracChangeset for help on using the changeset viewer.