aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2019-05-02 07:19:26 +0200
committerDan Gudmundsson <[email protected]>2019-05-02 07:19:26 +0200
commitadfd75bfdb9724daa6cc2215d7ae84b99397e8de (patch)
tree7a648b766a61ba3c81e50e61f48e8c139db852a6 /lib/stdlib/test
parentc53cb8cf9b446104d50f65a855684b4fe02c011e (diff)
downloadotp-adfd75bfdb9724daa6cc2215d7ae84b99397e8de.tar.gz
otp-adfd75bfdb9724daa6cc2215d7ae84b99397e8de.tar.bz2
otp-adfd75bfdb9724daa6cc2215d7ae84b99397e8de.zip
unicode_util gc/1
Could expand binary to list for to many elements. Fix and add tests.
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/unicode_util_SUITE.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/stdlib/test/unicode_util_SUITE.erl b/lib/stdlib/test/unicode_util_SUITE.erl
index 044b4e5834..6f55f204f4 100644
--- a/lib/stdlib/test/unicode_util_SUITE.erl
+++ b/lib/stdlib/test/unicode_util_SUITE.erl
@@ -428,7 +428,15 @@ mode(deep_l, Bin) -> [unicode:characters_to_list(Bin)].
fetch(Str, F) ->
case F(Str) of
[] -> [];
- [CP|R] -> [CP|fetch(R,F)]
+ [CP|R] ->
+ %% If input is a binary R should be binary
+ if is_binary(Str) == false -> ok;
+ is_binary(R); R =:= [] -> ok;
+ true ->
+ io:format("Char: ~tc Tail:~tP~n", [CP,R,10]),
+ exit({bug, F})
+ end,
+ [CP|fetch(R,F)]
end.
%% *Test.txt file helpers