Changeset 22592 for t

Show
Ignore:
Timestamp:
10/12/08 20:41:02 (6 weeks ago)
Author:
particle
Message:

[t] added tests for 'is export()'

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S11-modules/export.t

    r22489 r22592  
    22use Test; 
    33 
    4 plan 1; 
     4plan 8; 
    55 
    66# L<S11/"Exportation"/> 
    77 
    8 sub exp_no_parens is export           { 'exp_no_parens' } 
     8sub exp_no_parens is export             { 'exp_no_parens' } 
    99 
    1010 
     11##  make sure each side isn't undef 
     12is( exp_no_parens(), 'exp_no_parens', 
     13    'exp_no_parens() is defined' ); 
     14is( EXPORT::ALL::exp_no_parens(), 'exp_no_parens', 
     15    'EXPORT::ALL::exp_no_parens() is defined' ); 
     16##  two out of two values agree 
    1117ok( &exp_no_parens === &EXPORT::ALL::exp_no_parens, 
    12     'sub bound to ::EXPORT::ALL inner module' ); 
     18    'sub bound to ::EXPORT::ALL inner module -- values match' ); 
     19##  two out of two containers agree 
     20#?rakudo skip 'infix:<=:=> not implemented' 
     21ok( &exp_no_parens =:= &EXPORT::ALL::exp_no_parens, 
     22    'sub bound to ::EXPORT::ALL inner module -- containers match' ); 
    1323 
     24{ 
     25    package Foo { 
     26        sub Foo_exp_parens is export()  { 'Foo_exp_parens' } 
     27    } 
     28 
     29    ##  make sure each side isn't undef 
     30    is( Foo::Foo_exp_parens(), 'Foo_exp_parens', 
     31        'Foo_exp_parens() is defined' ); 
     32    is( Foo::EXPORT::ALL::Foo_exp_parens(), 'Foo_exp_parens', 
     33        'Foo_exp_parens() is defined' ); 
     34    ##  two out of two values agree 
     35    ok( &Foo::Foo_exp_parens === &Foo::EXPORT::ALL::Foo_exp_parens, 
     36        'Foo_exp_parens() matches Foo::EXPORT::ALL::Foo_exp_parens -- values match' ); 
     37    ##  two out of two containers agree 
     38#?rakudo skip 'infix:<=:=> not implemented' 
     39    ok( &Foo::Foo_exp_parens =:= &Foo::EXPORT::ALL::Foo_exp_parens, 
     40        'Foo_exp_parens() container matches Foo::EXPORT::ALL::Foo_exp_parens -- containers match' ); 
     41}