aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/ts_lib.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2015-09-29 11:43:30 +0200
committerSiri Hansen <[email protected]>2015-09-29 11:43:30 +0200
commit543231f01e46df527ad2a7ad74942836a05b5a00 (patch)
tree29a8e8cedc59c47857ee25a80973303d93b526c1 /lib/test_server/src/ts_lib.erl
parent71501e4307e78805bda531c78352913d12e1dfc9 (diff)
downloadotp-543231f01e46df527ad2a7ad74942836a05b5a00.tar.gz
otp-543231f01e46df527ad2a7ad74942836a05b5a00.tar.bz2
otp-543231f01e46df527ad2a7ad74942836a05b5a00.zip
Allow internal spaces in IFEQ test in generated Makefile
When generating Makefile from Makefile.src, ts_lib:get_arg/4 earlier removed all spaces in the extracted argument. The code was probably meant for removing leading and trailing spaces only, and is now corrected to do so.
Diffstat (limited to 'lib/test_server/src/ts_lib.erl')
-rw-r--r--lib/test_server/src/ts_lib.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/test_server/src/ts_lib.erl b/lib/test_server/src/ts_lib.erl
index 61bd55a654..7c3f450194 100644
--- a/lib/test_server/src/ts_lib.erl
+++ b/lib/test_server/src/ts_lib.erl
@@ -250,12 +250,10 @@ do_test(Rest, Vars, Test) ->
{Result,Comment,Rest2}.
%% extract an argument
-get_arg([$ |Rest], Vars, Stop, Acc) ->
- get_arg(Rest, Vars, Stop, Acc);
get_arg([$(|Rest], Vars, Stop, _) ->
get_arg(Rest, Vars, Stop, []);
get_arg([Stop|Rest], Vars, Stop, Acc) ->
- Arg = lists:reverse(Acc),
+ Arg = string:strip(lists:reverse(Acc)),
Subst = subst(Arg, Vars),
{Subst,Rest};
get_arg([C|Rest], Vars, Stop, Acc) ->