aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2018-05-17 11:52:04 +0200
committerGitHub <[email protected]>2018-05-17 11:52:04 +0200
commitdaf8172b510c319fab74f77e438eae3518812543 (patch)
treeb080dc47ab789bf6bc7613eb0748331af7fcb475 /lib/stdlib/test
parented16c60b34fd7bfd66bc5b32273877aaea453213 (diff)
parent5c51e87bee9d8db0503f41eda4ab0589df1a2ec1 (diff)
downloadotp-daf8172b510c319fab74f77e438eae3518812543.tar.gz
otp-daf8172b510c319fab74f77e438eae3518812543.tar.bz2
otp-daf8172b510c319fab74f77e438eae3518812543.zip
Merge pull request #1817 from dgud/dgud/stdlib/string-opt-case
OTP-14988
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/string_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdlib/test/string_SUITE.erl b/lib/stdlib/test/string_SUITE.erl
index fdff2d24b8..29fabb4583 100644
--- a/lib/stdlib/test/string_SUITE.erl
+++ b/lib/stdlib/test/string_SUITE.erl
@@ -810,6 +810,18 @@ do_measure(DataDir) ->
Do2(slice, repeat(fun() -> string:slice(S0, 20, 15) end), list),
Do2(slice, repeat(fun() -> string:slice(S0B, 20, 15) end), binary),
+ LCase = "areaa reare rerar earea reare reare",
+ LCaseB = unicode:characters_to_binary(LCase),
+ UCase = string:uppercase(LCase),
+ UCaseB = unicode:characters_to_binary(UCase),
+
+ Do2(to_upper_0, repeat(fun() -> string:to_upper(UCase) end), list),
+ Do2(uppercase_0, repeat(fun() -> string:uppercase(UCase) end), list),
+ Do2(uppercase_0, repeat(fun() -> string:uppercase(UCaseB) end), binary),
+ Do2(to_upper_a, repeat(fun() -> string:to_upper(LCase) end), list),
+ Do2(uppercase_a, repeat(fun() -> string:uppercase(LCase) end), list),
+ Do2(uppercase_a, repeat(fun() -> string:uppercase(LCaseB) end), binary),
+
io:format("--~n",[]),
NthTokens = {nth_lexemes, fun(Str) -> string:nth_lexeme(Str, 18000, [$\n,$\r]) end},
[Do(Name,Fun,Mode) || {Name,Fun} <- [NthTokens], Mode <- [list, binary]],