@@ -133,7 +133,7 @@ smoke_test_stdio_unicode(Config) ->
133133 stdio_test (" unicode.erl" , " --require-pragma" , Config ).
134134
135135smoke_test_stdio_insert_pragma_without (Config ) when is_list (Config ) ->
136- Formatted = os :cmd (" echo ' -module(nopragma).' | " ++ escript () ++ " - --insert-pragma" ),
136+ Formatted = os :cmd (" echo \" -module(nopragma).\" | " ++ escript () ++ " - --insert-pragma" ),
137137 Expected =
138138 " %%% % @format\n "
139139 " \n "
@@ -142,21 +142,21 @@ smoke_test_stdio_insert_pragma_without(Config) when is_list(Config) ->
142142
143143smoke_test_stdio_delete_pragma (Config ) when is_list (Config ) ->
144144 Formatted = os :cmd (
145- " echo ' %% @format\n\n -module(nopragma).' | " ++ escript () ++ " - --delete-pragma"
145+ " echo \" %% @format\n\n -module(nopragma).\" | " ++ escript () ++ " - --delete-pragma"
146146 ),
147147 Expected =
148148 " -module(nopragma).\n " ,
149149 ? assertEqual (Expected , Formatted ).
150150
151151smoke_test_stdio_delete_pragma_without (Config ) when is_list (Config ) ->
152- Formatted = os :cmd (" echo ' -module(nopragma).' | " ++ escript () ++ " - --delete-pragma" ),
152+ Formatted = os :cmd (" echo \" -module(nopragma).\" | " ++ escript () ++ " - --delete-pragma" ),
153153 Expected =
154154 " -module(nopragma).\n " ,
155155 ? assertEqual (Expected , Formatted ).
156156
157157smoke_test_stdio_delete_pragma_with_copyright (Config ) when is_list (Config ) ->
158158 Formatted = os :cmd (
159- " echo ' %% @format\n %% copyright\n\n -module(nopragma).' | " ++ escript () ++
159+ " echo \" %% @format\n %% copyright\n\n -module(nopragma).\" | " ++ escript () ++
160160 " - --delete-pragma"
161161 ),
162162 Expected =
@@ -167,7 +167,7 @@ smoke_test_stdio_delete_pragma_with_copyright(Config) when is_list(Config) ->
167167
168168smoke_test_stdio_reinsert_pragma (Config ) when is_list (Config ) ->
169169 Formatted = os :cmd (
170- " echo ' %% @format\n %%% copyright\n\n -module(nopragma).' | " ++ escript () ++
170+ " echo \" %% @format\n %%% copyright\n\n -module(nopragma).\" | " ++ escript () ++
171171 " - --insert-pragma"
172172 ),
173173 Expected =
@@ -180,7 +180,7 @@ smoke_test_stdio_reinsert_pragma(Config) when is_list(Config) ->
180180% % respect the number of percentages when replacing the pragma
181181smoke_test_stdio_reinsert_pragma_second (Config ) when is_list (Config ) ->
182182 Formatted = os :cmd (
183- " echo ' %% copyright\n %% @format\n\n -module(nopragma).' | " ++ escript () ++
183+ " echo \" %% copyright\n %% @format\n\n -module(nopragma).\" | " ++ escript () ++
184184 " - --insert-pragma"
185185 ),
186186 Expected =
@@ -192,7 +192,7 @@ smoke_test_stdio_reinsert_pragma_second(Config) when is_list(Config) ->
192192
193193smoke_test_stdio_reinsert_pragma_config (Config ) when is_list (Config ) ->
194194 Formatted = os :cmd (
195- " echo ' %% @format\n\n %%% actual comment\n {}.\n ' | " ++ escript () ++
195+ " echo \" %% @format\n\n %%% actual comment\n {}.\n\" | " ++ escript () ++
196196 " - --insert-pragma"
197197 ),
198198 Expected =
@@ -238,7 +238,7 @@ noformat_pragma_file(Config) when is_list(Config) ->
238238
239239noformat_pragma (Config ) when is_list (Config ) ->
240240 Formatted = os :cmd (
241- " echo ' %% @noformat\n\n %%% actual comment\n { }.' | " ++ escript () ++ " -"
241+ " echo \" %% @noformat\n\n %%% actual comment\n { }.\" | " ++ escript () ++ " -"
242242 ),
243243 Expected =
244244 " %% @noformat\n "
@@ -280,7 +280,6 @@ stdio_test(FileName, Options, Config) ->
280280 DataDir = ? config (data_dir , Config ),
281281 Path = filename :join (DataDir , FileName ),
282282 Formatted = os :cmd (" cat " ++ Path ++ " | " ++ escript () ++ " - " ++ Options ),
283- % ?assertEqual(toto, Path),
284283 {ok , Expected } = file :read_file (Path ),
285284 assert_diagnostic :assert_binary_match (Expected , unicode :characters_to_binary (Formatted )).
286285
0 commit comments