Changeset 3067

Show
Ignore:
Timestamp:
05/12/05 13:34:59 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
4536
Message:

* join.t fixed

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/List.hs

    r3066 r3067  
    9090 
    9191op2Join :: Val -> Val -> Eval Val 
     92op2Join (VList [x@(VRef _)]) y = op2Join x y 
    9293op2Join x y = do 
    9394    (strVal, listVal) <- ifValTypeIsa x "Scalar" 
  • t/builtins/lists/join.t

    r2367 r3067  
    2121 
    2222my $joined4 = join("|", [ "a", "b", "c" ]); 
    23 is($joined4, "a|b|c", 'join("|", []) works'); 
     23is($joined4, "a b c", 'join("|", []) should not join anything'); 
    2424 
    2525# join() with $sep as a variable 
     
    3838 
    3939my $joined4a = join($sep, [ "a", "b", "c" ]); 
    40 is($joined4a, "a, b, c", 'join($sep, []) works'); 
     40is($joined4a, "a b c", 'join($sep, []) works'); 
    4141 
    4242# join ... without parens 
     
    5555 
    5656my $joined4b = join $sep, [ "a", "b", "c" ]; 
    57 is($joined4b, "a, b, c", 'join $sep, [] works'); 
     57is($joined4b, "a b c", 'join $sep, [] should not join anything'); 
    5858 
    5959my $joined4c = join ":", [ "a", "b", "c" ]; 
    60 is($joined4c, "a:b:c", 'join ":", [] works'); 
     60is($joined4c, "a b c", 'join ":", [] should not join anything'); 
    6161 
    6262# join() with empty string as seperator 
     
    7575 
    7676my $joined4d = join("", [ "a", "b", "c" ]); 
    77 is($joined4d, "abc", 'join("", []) works'); 
     77is($joined4d, "a b c", 'join("", []) works'); 
    7878 
    7979# some odd edge cases