Ticket #794: TT_794.patch
File TT_794.patch, 1.5 KB (added by NotFound, 13 years ago) |
---|
-
src/string/api.c
3361 3361 if (STRING_IS_NULL(delim) || STRING_IS_NULL(str)) 3362 3362 return PMCNULL; 3363 3363 3364 res = pmc_new(interp, enum_class_ResizableStringArray);3364 res = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray)); 3365 3365 slen = Parrot_str_byte_length(interp, str); 3366 3366 3367 3367 if (!slen) -
t/op/string.t
7 7 use lib qw( . lib ../lib ../../lib ); 8 8 9 9 use Test::More; 10 use Parrot::Test tests => 16 5;10 use Parrot::Test tests => 166; 11 11 use Parrot::Config; 12 12 13 13 =head1 NAME … … 2639 2639 2640 2640 OUTPUT 2641 2641 2642 pir_output_is( <<'CODE', <<'OUTPUT', 'split HLL mapped' ); 2643 .HLL 'foohll' 2644 .sub main 2645 .local pmc RSA, fooRSA 2646 RSA = get_class ['ResizableStringArray'] 2647 fooRSA = subclass ['ResizableStringArray'], 'fooRSA' 2648 .local pmc interp 2649 interp = getinterp 2650 interp.'hll_map'(RSA, fooRSA) 2651 .local pmc a 2652 split a, "a", "afooabara" 2653 .local string t 2654 t = typeof a 2655 say t 2656 .local int n, i 2657 n = a 2658 say n 2659 i = 0 2660 loop: 2661 .local string s 2662 s = a[i] 2663 say s 2664 inc i 2665 if i != n goto loop 2666 .end 2667 CODE 2668 fooRSA 2669 5 2670 2671 foo 2672 b 2673 r 2674 2675 OUTPUT 2676 2642 2677 pasm_output_is( <<'CODE', <<'OUTPUT', 'join' ); 2643 2678 _main: 2644 2679 new P0, 'ResizablePMCArray'