Changeset 22021

Show
Ignore:
Timestamp:
08/23/08 12:19:03 (3 months ago)
Author:
moritz
Message:

[t] move subst.t to spec/, changed fudging a bit and added smartlink

Location:
t/spec/S05-substitution
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • t/spec/S05-substitution/subst.t

    r21867 r22021  
    55plan 12; 
    66 
     7# L<S05/Substitution/> 
    78 
    89my $str = 'hello'; 
     
    1011is $str.subst(/h/,'f'),       'fello', 'We can use subst'; 
    1112is $str,                      'hello', '.. withouth side effect'; 
    12 #?rakudo eval "multiple adverbs not implemented" 
     13#?rakudo skip "multiple adverbs not implemented" 
    1314is $str.subst(rx:g:i/L/,'p'), 'heppo', '.. with multiple adverbs'; 
    1415 
     
    1920#?rakudo eval "subst with a block parameter not implemented" 
    2021is $str.subst(/l/,{$i++}),    'he0lo', 'We can have a closure as replacement'; 
    21 #?rakudo eval "multiple adverbs not implemented" 
     22#?rakudo skip "multiple adverbs not implemented" 
    2223is $str.subst(rx:g/l/,{$i++}),'he12o', '.. which act like closure and can be called more then once'; 
    23 #?rakudo eval "rakudo doesn't like dotty methods [perl #57740]" 
     24#?rakudo skip "rakudo doesn't like dotty methods [perl #57740]" 
    2425is $str.=subst(/l/,'i'),      'heilo', '.. and with the .= modifier'; 
    25 #?rakudo eval "skipped because the one before was skipped" 
     26#?rakudo skip "(test dependency)" 
    2627is $str,                      'heilo', '.. it changes the receiver'; 
    2728 
    2829# not sure about this. Maybe '$1$0' should work. 
    2930 
    30 #?rakudo eval '$/ not involved in .subst yet' 
     31#?rakudo 3 skip '$/ not involved in .subst yet (unspecced?)' 
    3132is 'a'.subst(/(.)/,"$1$0"), '',       '.. and it can not access captures from strings'; 
    32 #?rakudo eval '$/ not involved in .subst yet' 
    3333is 'a'.subst(/(.)/,{$0~$0}),'aa',     '.. you must wrap it in a closure'; 
    34 #?rakudo eval '$/ not involved in .subst yet' 
    3534is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures';  
    3635