[svn:parrot] r48445 - trunk/t/op
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Fri Aug 13 06:58:36 UTC 2010
Author: NotFound
Date: Fri Aug 13 06:58:36 2010
New Revision: 48445
URL: https://trac.parrot.org/parrot/changeset/48445
Log:
test string split with null args
Modified:
trunk/t/op/string.t
Modified: trunk/t/op/string.t
==============================================================================
--- trunk/t/op/string.t Fri Aug 13 06:39:10 2010 (r48444)
+++ trunk/t/op/string.t Fri Aug 13 06:58:36 2010 (r48445)
@@ -121,6 +121,7 @@
test_find_encoding()
test_assign()
assign_and_globber()
+ split_on_null_string()
split_on_empty_string()
split_on_non_empty_string()
test_join()
@@ -1388,6 +1389,28 @@
is( $S5, "JAPH", 'assign & globber' )
.end
+.sub split_on_null_string
+ .local string s, delim
+ .local pmc p
+ .local int i
+ null s
+ null delim
+ split p, s, delim
+ i = isnull p
+ is(i, 1, 'split on null string and delim')
+
+ s = 'foo'
+ split p, s, delim
+ i = isnull p
+ is(i, 1, 'split on null delim')
+
+ null s
+ delim = 'bar'
+ split p, s, delim
+ i = isnull p
+ is(i, 1, 'split on null string')
+.end
+
.sub split_on_empty_string
split $P1, "", ""
set $I1, $P1
More information about the parrot-commits
mailing list