diff options
author | Sverker Eriksson <[email protected]> | 2015-11-16 15:39:02 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-11-16 15:39:02 +0100 |
commit | 1f61a1f613486d4909f1c43b0d7ca46767e88e23 (patch) | |
tree | eef0c3c37c5b61b013ccda2d4ec6a65da0b41791 /lib/stdlib | |
parent | 9bdd69a560765931cdd5dac50c8c8389263a2f6b (diff) | |
parent | fd1e6b2b2623395512ea0450c3b4e656cb354f42 (diff) | |
download | otp-1f61a1f613486d4909f1c43b0d7ca46767e88e23.tar.gz otp-1f61a1f613486d4909f1c43b0d7ca46767e88e23.tar.bz2 otp-1f61a1f613486d4909f1c43b0d7ca46767e88e23.zip |
Merge branch 'sverk/binary-split-bug'
* sverk/binary-split-bug:
stdlib: Fix bug in binary:split for empty binary
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/test/binary_module_SUITE.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl index 70c946bdb9..933c3ce5a9 100644 --- a/lib/stdlib/test/binary_module_SUITE.erl +++ b/lib/stdlib/test/binary_module_SUITE.erl @@ -536,6 +536,12 @@ do_interesting(Module) -> ?line [<<3>>,<<6>>] = Module:split(<<1,2,3,4,5,6,7,8>>, [<<1>>,<<2>>,<<4>>,<<5>>,<<7>>,<<8>>], [global,trim_all]), + [<<>>] = binary:split(<<>>, <<",">>, []), + [] = binary:split(<<>>, <<",">>, [trim]), + [] = binary:split(<<>>, <<",">>, [trim_all]), + [] = binary:split(<<>>, <<",">>, [global,trim]), + [] = binary:split(<<>>, <<",">>, [global,trim_all]), + ?line badarg = ?MASK_ERROR( Module:replace(<<1,2,3,4,5,6,7,8>>, [<<4,5>>,<<7>>,<<8>>],<<99>>, |