aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/test/fprof_SUITE_data
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-09-19 15:34:09 +0200
committerHans Bolinder <[email protected]>2017-09-20 08:16:31 +0200
commit918e7de543f729b6fad35c22eaeeb3fba3a4a7ba (patch)
treeef8acf9e663a8aa6ffc6784d78b687fe0422dc0b /lib/tools/test/fprof_SUITE_data
parente01a81ba3119247b8837f6202591c2a3fec264e9 (diff)
downloadotp-918e7de543f729b6fad35c22eaeeb3fba3a4a7ba.tar.gz
otp-918e7de543f729b6fad35c22eaeeb3fba3a4a7ba.tar.bz2
otp-918e7de543f729b6fad35c22eaeeb3fba3a4a7ba.zip
fprof: Make sure the receiving file can handle Unicode
It is assumed that I/O devices can handle character codes greater than 255.
Diffstat (limited to 'lib/tools/test/fprof_SUITE_data')
-rw-r--r--lib/tools/test/fprof_SUITE_data/fprof_unicode.erl36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/tools/test/fprof_SUITE_data/fprof_unicode.erl b/lib/tools/test/fprof_SUITE_data/fprof_unicode.erl
new file mode 100644
index 0000000000..8b58efc5fe
--- /dev/null
+++ b/lib/tools/test/fprof_SUITE_data/fprof_unicode.erl
@@ -0,0 +1,36 @@
+-module(fprof_unicode).
+
+-export([t/0, 'кирилли́ческий атом'/0, annan/0, c_break/1,
+ 'кирилли́ческий атомB'/1]).
+
+t() ->
+ _Atom = 'кирилли́ческий атом',
+ 'кирилли́ческий атом'().
+
+'кирилли́ческий атом'() ->
+ 'кирилли́ческий атом'('кирилли́ческий атом').
+
+'кирилли́ческий атом'(_Atom) ->
+ self() ! 'кирилли́ческий атом',
+ G = fun (X) ->
+ catch foo:bar()
+ end,
+ G("кирилли́ческий атом"), % line 17
+ Pid = spawn_link(fun() -> waiting() end),
+ true = register('кирилли́ческий атом', Pid),
+ F = fun() -> 'кирилли́ческий атом' end,
+ F().
+
+annan() ->
+ foo.
+
+waiting() ->
+ receive
+ X -> X
+ end.
+
+c_break(_B) ->
+ true.
+
+'кирилли́ческий атомB'(_B) ->
+ true.