aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/escript_SUITE_data/unicode1
blob: 351bb785e551a7727d7e6196b2d0ab2e14732afa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env escript
%% -*- erlang -*-

-export([main/1]).

main(_) ->
    ok = io:setopts([{encoding,unicode}]),
    _D = erlang:system_flag(backtrace_depth, 0),
    A = <<"\x{aaa}"/utf8>>,
    S = lists:flatten(io_lib:format("~p/~p.", [A, A])),
    {ok, Ts, _} = erl_scan:string(S, 1, [unicode]),
    {ok, Es} = erl_parse:parse_exprs(Ts),
    B = erl_eval:new_bindings(),
    erl_eval:exprs(Es, B).