aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2019-04-23 08:51:19 +0200
committerDan Gudmundsson <[email protected]>2019-04-23 08:51:19 +0200
commitddb3aff54904342b0d2e45d9419e8638467d61bc (patch)
tree7cdffea2264c578380ea0bd62c3e4228b70338de
parent90eb43d0b61b5a51aede0537e394bd02216b6fa0 (diff)
parent7287943b470c3fe6ceefd1f9a9fea68736a2b37f (diff)
downloadotp-ddb3aff54904342b0d2e45d9419e8638467d61bc.tar.gz
otp-ddb3aff54904342b0d2e45d9419e8638467d61bc.tar.bz2
otp-ddb3aff54904342b0d2e45d9419e8638467d61bc.zip
Merge branch 'dgud/emacs-test-uc-path'
* dgud/emacs-test-uc-path: Fix emacs tests
-rw-r--r--lib/tools/test/emacs_SUITE.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/tools/test/emacs_SUITE.erl b/lib/tools/test/emacs_SUITE.erl
index 8756a4e9b3..73270e6ed6 100644
--- a/lib/tools/test/emacs_SUITE.erl
+++ b/lib/tools/test/emacs_SUITE.erl
@@ -119,7 +119,7 @@ compile_and_load(_Config) ->
false -> " "
end,
emacs([Pedantic,
- " -f batch-byte-compile ",filename:join(Dir, File)]),
+ " -f batch-byte-compile ", dquote(filename:join(Dir, File))]),
true
end,
lists:foreach(Compile, Files),
@@ -144,6 +144,10 @@ tests_compiled(_Config) ->
ok
end.
+
+dquote(Str) ->
+ "\"" ++ Str ++ "\"".
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
indent(Config) ->
@@ -207,14 +211,14 @@ emacs_version_ok(AcceptVer) ->
emacs(EmacsCmds) when is_list(EmacsCmds) ->
Cmd = ["emacs ",
"--batch --quick ",
- "--directory ", emacs_dir(), " ",
+ "--directory ", dquote(emacs_dir()), " ",
"--eval \"(require 'erlang-start)\" "
| EmacsCmds],
Res0 = os:cmd(Cmd ++ " ; echo $?"),
Rows = string:lexemes(Res0, ["\r\n", $\n]),
Res = lists:last(Rows),
Output = string:join(lists:droplast(Rows), "\n"),
- io:format("Cmd ~s:~n => ~s ~ts~n", [Cmd, Res, Output]),
+ io:format("Cmd ~ts:~n => ~s ~ts~n", [Cmd, Res, Output]),
"0" = Res,
Output.