- Timestamp:
- 10/12/08 20:41:02 (6 weeks ago)
- Files:
-
- 1 modified
-
t/spec/S11-modules/export.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S11-modules/export.t
r22489 r22592 2 2 use Test; 3 3 4 plan 1;4 plan 8; 5 5 6 6 # L<S11/"Exportation"/> 7 7 8 sub exp_no_parens is export { 'exp_no_parens' }8 sub exp_no_parens is export { 'exp_no_parens' } 9 9 10 10 11 ## make sure each side isn't undef 12 is( exp_no_parens(), 'exp_no_parens', 13 'exp_no_parens() is defined' ); 14 is( EXPORT::ALL::exp_no_parens(), 'exp_no_parens', 15 'EXPORT::ALL::exp_no_parens() is defined' ); 16 ## two out of two values agree 11 17 ok( &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' 21 ok( &exp_no_parens =:= &EXPORT::ALL::exp_no_parens, 22 'sub bound to ::EXPORT::ALL inner module -- containers match' ); 13 23 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 }
