aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/binary_module_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-11-13 19:13:03 +0100
committerSverker Eriksson <[email protected]>2015-11-13 19:13:20 +0100
commitfd1e6b2b2623395512ea0450c3b4e656cb354f42 (patch)
tree91adb925cfd7482af576127e4847d12f9d138971 /lib/stdlib/test/binary_module_SUITE.erl
parent76c67f6ab6b33033e1efb1b1fd190be163c99ef4 (diff)
downloadotp-fd1e6b2b2623395512ea0450c3b4e656cb354f42.tar.gz
otp-fd1e6b2b2623395512ea0450c3b4e656cb354f42.tar.bz2
otp-fd1e6b2b2623395512ea0450c3b4e656cb354f42.zip
stdlib: Fix bug in binary:split for empty binary
Bug introduced om master branch at b93e9b611056828a and reported in ERL-43.
Diffstat (limited to 'lib/stdlib/test/binary_module_SUITE.erl')
-rw-r--r--lib/stdlib/test/binary_module_SUITE.erl6
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>>,