Permalink
Browse files

syntax_tools: Make erl_tidy work on input file with tilde

  • Loading branch information...
mbucc authored and uabboli committed May 27, 2016
1 parent 3b40902 commit 0969ecad9e2978bacb7b27f663cd16aa5ea6c460
@@ -414,7 +414,7 @@ write_module(Tree, Name, Opts) ->
print_module(Tree, Opts) ->
Printer = proplists:get_value(printer, Opts),
io:format(Printer(Tree, Opts)).
io:put_chars(Printer(Tree, Opts)).
output(FD, Printer, Tree, Opts) ->
io:put_chars(FD, Printer(Tree, Opts)),
@@ -27,14 +27,14 @@
%% Test cases
-export([app_test/1,appup_test/1,smoke_test/1,revert/1,revert_map/1,
t_abstract_type/1,t_erl_parse_type/1,t_epp_dodger/1,
t_comment_scan/1,t_igor/1]).
t_comment_scan/1,t_igor/1,t_erl_tidy/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[app_test,appup_test,smoke_test,revert,revert_map,
t_abstract_type,t_erl_parse_type,t_epp_dodger,
t_comment_scan,t_igor].
t_comment_scan,t_igor,t_erl_tidy].
groups() ->
[].
@@ -237,6 +237,12 @@ t_igor(Config) when is_list(Config) ->
ok.
t_erl_tidy(Config) when is_list(Config) ->
DataDir = ?config(data_dir, Config),
File = filename:join(DataDir,"erl_tidy_tilde.erl"),
ok = erl_tidy:file(File, [{stdout, true}]),
ok.
test_comment_scan([],_) -> ok;
test_comment_scan([File|Files],DataDir) ->
Filename = filename:join(DataDir,File),
@@ -0,0 +1,13 @@
%%
%% File: erl_tidy_tilde.erl
%% Author: Mark Bucciarelli
%% Created: 2016-06-05
%%
-module(erl_tidy_tilde).
-export([start/0]).
start() ->
io:put_chars("tilde characters ('~')in source were "
"breaking erl_tidy\n").

0 comments on commit 0969eca

Please sign in to comment.