6 use Support::TestSetup;
 
   8 Support::TestSetup::login();
 
  12 ok( SL::Auth::evaluate_rights_ary(['1']), 'simple: right');
 
  13 ok(!SL::Auth::evaluate_rights_ary(['0']), 'simple: no right');
 
  14 ok( SL::Auth::evaluate_rights_ary(['1', '|', 0]), 'simple: or');
 
  15 ok( SL::Auth::evaluate_rights_ary(['0', '|', '1']), 'simple: or 2');
 
  16 ok(!SL::Auth::evaluate_rights_ary(['1', '&', '0']), 'simple: and');
 
  17 ok(!SL::Auth::evaluate_rights_ary(['0', '&', '1']), 'simple: and 2');
 
  18 ok( SL::Auth::evaluate_rights_ary(['1', '&', '1']), 'simple: and 3');
 
  19 ok(!SL::Auth::evaluate_rights_ary(['!', '1']), 'simple: not');
 
  20 ok( SL::Auth::evaluate_rights_ary(['!', '0']), 'simple: not 2');
 
  21 ok(!SL::Auth::evaluate_rights_ary(['!', '!', '0']), 'simple: double not');
 
  22 ok( SL::Auth::evaluate_rights_ary(['!', ['0']]), 'not 1');
 
  23 ok(!SL::Auth::evaluate_rights_ary(['!', ['1']]), 'not 2');
 
  24 ok( SL::Auth::evaluate_rights_ary(['!', '!', ['1']]), 'double not');
 
  25 ok( SL::Auth::evaluate_rights_ary([ '!', ['!', ['1', '&', '1'], '&', '!', '!', ['1', '|', '!', '1']] ]), 'something more coplex');