3333 init_per_testcase /2 , end_per_testcase /2 ]).
3434
3535-export ([args_file /1 , evil_args_file /1 , missing_args_file /1 , env /1 , args_file_env /1 ,
36+ unicode_args_file /1 ,
3637 otp_7461 /1 , otp_7461_remote /1 , argument_separation /1 , argument_with_option /1 ,
3738 zdbbl_dist_buf_busy_limit /1 , long_path_env /1 , argument_too_large /1 ]).
3839
@@ -43,7 +44,7 @@ suite() ->
4344 {timetrap , {minutes , 1 }}].
4445
4546all () ->
46- [args_file , evil_args_file , missing_args_file , env , args_file_env ,
47+ [args_file , evil_args_file , missing_args_file , env , args_file_env , unicode_args_file ,
4748 otp_7461 , argument_separation , argument_with_option , zdbbl_dist_buf_busy_limit ,
4849 long_path_env , argument_too_large ].
4950
@@ -321,6 +322,22 @@ missing_args_file(Config) when is_list(Config) ->
321322 exit ({unexpected_args_output , Output , Error })
322323 end .
323324
325+ unicode_args_file (Config ) when is_list (Config ) ->
326+ % % Test that -args_file works with Unicode paths (e.g. Cyrillic).
327+ % % This is a regression test for a bug where fopen() on Windows
328+ % % could not open files with non-ASCII paths.
329+ PrivDir = proplists :get_value (priv_dir , Config ),
330+ UnicodeDir = filename :join (PrivDir , " Артем" ),
331+ ok = file :make_dir (UnicodeDir ),
332+ AFN = filename :join (UnicodeDir , " args.txt" ),
333+ write_file (AFN , " -MiscArg1 +\\ #100 -extra +XtraArg1" ),
334+ CmdLine = " -args_file " ++ AFN ,
335+ {Emu , Misc , Extra } = emu_args (CmdLine ),
336+ verify_args ([" -#100" ], Emu ),
337+ verify_args ([" -MiscArg1" ], Misc ),
338+ verify_args ([" +XtraArg1" ], Extra ),
339+ ok .
340+
324341env (Config ) when is_list (Config ) ->
325342 os :putenv (" ERL_AFLAGS" , " -MiscArg1 +#100 -extra +XtraArg1 +XtraArg2" ),
326343 CmdLine = " +#200 -MiscArg2 -extra +XtraArg3 +XtraArg4" ,
0 commit comments