diff --git a/tests/tests/regression_tests.rs b/tests/tests/regression_tests.rs index 5ff4d350a..32343aff9 100644 --- a/tests/tests/regression_tests.rs +++ b/tests/tests/regression_tests.rs @@ -570,6 +570,7 @@ swf_tests! { (as3_string_length, "avm2/string_length", 1), (as3_string_char_at, "avm2/string_char_at", 1), (as3_string_char_code_at, "avm2/string_char_code_at", 1), + (as3_string_split, "avm2/string_split", 1), (as3_typeof, "avm2/typeof", 1), (use_hand_cursor, "avm1/use_hand_cursor", 1), (as3_movieclip_displayevents, "avm2/movieclip_displayevents", 9), diff --git a/tests/tests/swfs/avm2/string_split/output.txt b/tests/tests/swfs/avm2/string_split/output.txt new file mode 100644 index 000000000..f020ed42e --- /dev/null +++ b/tests/tests/swfs/avm2/string_split/output.txt @@ -0,0 +1,9 @@ +// var text = "a.b.c"; +// text.split("a.b.c") +, +// text.split(".") +a,b,c +// text.split("") +a,.,b,.,c +// text.split() - unimplemented +// text.split(regex) - unimplemented diff --git a/tests/tests/swfs/avm2/string_split/test.as b/tests/tests/swfs/avm2/string_split/test.as new file mode 100644 index 000000000..76a962489 --- /dev/null +++ b/tests/tests/swfs/avm2/string_split/test.as @@ -0,0 +1,26 @@ +package { + import flash.display.MovieClip; + + public class Test extends MovieClip { + public function Test() { + +// note: compiled manually with AIR SDK + +trace('// var text = "a.b.c";'); +var text = "a.b.c"; + +trace('// text.split("a.b.c")'); +trace(text.split("a.b.c")); +trace('// text.split(".")'); +trace(text.split(".")); +trace('// text.split("")'); +trace(text.split("")); + +trace('// text.split() - unimplemented'); +trace('// text.split(regex) - unimplemented'); + + + } + } +} + diff --git a/tests/tests/swfs/avm2/string_split/test.swf b/tests/tests/swfs/avm2/string_split/test.swf new file mode 100644 index 000000000..9618de290 Binary files /dev/null and b/tests/tests/swfs/avm2/string_split/test.swf differ