diff options
author | Fredrik Gustafsson <[email protected]> | 2013-01-17 11:58:28 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-01-17 11:58:28 +0100 |
commit | cc7e26049cae8cb95793cf9af98424907a2ce644 (patch) | |
tree | 3b79682fcd50dd9284ae66c9fd9eb16442e0c5d6 /lib/stdlib/test/escript_SUITE.erl | |
parent | 3bfdf85c503df603920f7a4b77ccb2a2dc438455 (diff) | |
parent | 3f74aa2f7a1ef3703d749edae627cb3766d40434 (diff) | |
download | otp-cc7e26049cae8cb95793cf9af98424907a2ce644.tar.gz otp-cc7e26049cae8cb95793cf9af98424907a2ce644.tar.bz2 otp-cc7e26049cae8cb95793cf9af98424907a2ce644.zip |
Merge branch 'mh/escript_emulator_flags_vs_shebang/OTP-10691'
* mh/escript_emulator_flags_vs_shebang/OTP-10691:
escript to accept emulator arguments when script file has no shebang
Diffstat (limited to 'lib/stdlib/test/escript_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/escript_SUITE.erl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/stdlib/test/escript_SUITE.erl b/lib/stdlib/test/escript_SUITE.erl index 7634c21a17..3749d594f2 100644 --- a/lib/stdlib/test/escript_SUITE.erl +++ b/lib/stdlib/test/escript_SUITE.erl @@ -26,6 +26,7 @@ errors/1, strange_name/1, emulator_flags/1, + emulator_flags_no_shebang/1, module_script/1, beam_script/1, archive_script/1, @@ -45,6 +46,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [basic, errors, strange_name, emulator_flags, + emulator_flags_no_shebang, module_script, beam_script, archive_script, epp, create_and_extract, foldl, overflow, archive_script_file_access, unicode]. @@ -150,6 +152,21 @@ emulator_flags(Config) when is_list(Config) -> ok. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +emulator_flags_no_shebang(Config) when is_list(Config) -> + Data = ?config(data_dir, Config), + Dir = filename:absname(Data), %Get rid of trailing slash. + %% Need run_with_opts, to always use "escript" explicitly + ?line run_with_opts(Dir, "", "emulator_flags_no_shebang -arg1 arg2 arg3", + [<<"main:[\"-arg1\",\"arg2\",\"arg3\"]\n" + "nostick:[{nostick,[]}]\n" + "mnesia:[{mnesia,[\"dir\",\"a/directory\"]},{mnesia,[\"debug\",\"verbose\"]}]\n" + "ERL_FLAGS=false\n" + "unknown:[]\n" + "ExitCode:0">>]), + ok. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Pick the source code from the emulator_flags script %% Generate a new escript with a module header |