@@ -358,6 +358,16 @@ func TestStrMethods(t *testing.T) {
358358 {"split" , wrapArgs ("a \t b\n c" , None , 1 ), newTestList ("a" , "b\n c" ).ToObject (), nil },
359359 {"split" , wrapArgs ("foo" , 1 ), nil , mustCreateException (TypeErrorType , "expected a str separator" )},
360360 {"split" , wrapArgs ("foo" , "" ), nil , mustCreateException (ValueErrorType , "empty separator" )},
361+ {"split" , wrapArgs ("" ), newTestList ().ToObject (), nil },
362+ {"split" , wrapArgs (" " ), newTestList ().ToObject (), nil },
363+ {"split" , wrapArgs ("" , "x" ), newTestList ("" ).ToObject (), nil },
364+ {"split" , wrapArgs (" " , " " , 1 ), newTestList ("" , "" ).ToObject (), nil },
365+ {"split" , wrapArgs ("aa" , "a" , 2 ), newTestList ("" , "" , "" ).ToObject (), nil },
366+ {"split" , wrapArgs (" a " , "a" ), newTestList (" " , " " ).ToObject (), nil },
367+ {"split" , wrapArgs ("a b c d" , None , 1 ), newTestList ("a" , "b c d" ).ToObject (), nil },
368+ {"split" , wrapArgs ("a b c d " ), newTestList ("a" , "b" , "c" , "d" ).ToObject (), nil },
369+ {"split" , wrapArgs (" a b c d " , None , 1 ), newTestList ("a" , "b c d " ).ToObject (), nil },
370+ {"split" , wrapArgs (" a b c d " , None , 0 ), newTestList ("a b c d " ).ToObject (), nil },
361371 {"splitlines" , wrapArgs ("" ), NewList ().ToObject (), nil },
362372 {"splitlines" , wrapArgs ("\n " ), newTestList ("" ).ToObject (), nil },
363373 {"splitlines" , wrapArgs ("foo" ), newTestList ("foo" ).ToObject (), nil },
0 commit comments