aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/test/tutf8.erl
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-05-11 15:07:39 +0200
committerZandra Hird <[email protected]>2015-05-11 15:07:39 +0200
commit0fad26858f4e952d25ef5372dda634587ad77b57 (patch)
tree37bb39c15e7f74d1df97eb12a065d1456d5ea483 /lib/eunit/test/tutf8.erl
parent1f9201ca7db28e19e92c094b0317230ee930829c (diff)
parent65d41cb6c514308ab11645dc2d0842d4f6b629a4 (diff)
downloadotp-0fad26858f4e952d25ef5372dda634587ad77b57.tar.gz
otp-0fad26858f4e952d25ef5372dda634587ad77b57.tar.bz2
otp-0fad26858f4e952d25ef5372dda634587ad77b57.zip
Merge branch 'vladdu/eunit_unicode_OTP11660'
* vladdu/eunit_unicode_OTP11660: OTP-11660: make eunit unicode safe
Diffstat (limited to 'lib/eunit/test/tutf8.erl')
-rw-r--r--lib/eunit/test/tutf8.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/eunit/test/tutf8.erl b/lib/eunit/test/tutf8.erl
new file mode 100644
index 0000000000..c902f3ad18
--- /dev/null
+++ b/lib/eunit/test/tutf8.erl
@@ -0,0 +1,15 @@
+%% coding: utf-8
+
+-module(tutf8).
+
+-include_lib("eunit/include/eunit.hrl").
+
+'foo_ö_test_'() ->
+ [
+ {"1ö汉1", fun() -> io:format("1å汉1 ~s ~w",[<<"aö汉">>, 'Zök']), io:format([128,64,255,255]), ?assert("gö汉"=="gö汉") end}
+ ,{<<"2ö汉2">>, fun() -> io:format("2å汉2 ~s",[<<"bö汉">>]), io:format([128,64]), ?assert("gö汉"=="gö汉") end}
+ ,{<<"3ö汉3"/utf8>>, fun() -> io:format("3å汉3 ~ts",[<<"cö汉"/utf8>>]), io:format([128,64]), ?assert("gö汉"=="gö汉") end}
+ ,{"1ä汉1", fun() -> io:format("1ä汉1 ~s ~w",[<<"aä汉">>, 'Zbäd']), io:format([128,64,255,255]), ?assert("wå汉"=="wä汉") end}
+ ,{<<"2ä汉2">>, fun() -> io:format("2ä汉2 ~s",[<<"bä汉">>]), io:format([128,64]), ?assert("wå汉"=="wä汉") end}
+ ,{<<"3ä汉"/utf8>>, fun() -> io:format("3ä汉3 ~ts",[<<"cä汉"/utf8>>]), io:format([128,64]), ?assert("wå汉"=="wä汉") end}
+ ].