From c529921fc8c7d92791fed08777250c25b29b6f8d Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 6 Jul 2011 16:23:10 +0000 Subject: [PATCH] * clarify environment processing git-svn-id: trunk@17942 - --- tests/utils/dotest.pp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/utils/dotest.pp b/tests/utils/dotest.pp index f140bde9da..731b7a6aff 100644 --- a/tests/utils/dotest.pp +++ b/tests/utils/dotest.pp @@ -1082,9 +1082,6 @@ end; procedure getargs; -var - para : string; - i : longint; procedure helpscreen; begin @@ -1116,11 +1113,12 @@ var halt(1); end; - procedure interpret_option (arg : string); + procedure interpret_option (para : string); var ch : char; j : longint; begin + Verbose(V_Debug,'Interpreting option"'+para+'"'); ch:=Upcase(para[2]); delete(para,1,2); case ch of @@ -1209,9 +1207,11 @@ var para : string; pspace : longint; begin + Verbose(V_Debug,'Interpreting environment option"'+arg+'"'); { Get rid of leading '!' } delete(arg,1,1); arg:=getenv(arg); + Verbose(V_Debug,'Environment value is "'+arg+'"'); while (length(arg)>0) do begin while (length(arg)>0) and (arg[1]=' ') do @@ -1231,18 +1231,22 @@ var end; end; +var + param : string; + i : longint; + begin CompilerBin:='ppc386'+srcexeext; for i:=1 to paramcount do begin - para:=Paramstr(i); - if (para[1]='-') then - interpret_option(para) - else if (para[1]='!') then - interpret_env(para) + param:=Paramstr(i); + if (param[1]='-') then + interpret_option(param) + else if (param[1]='!') then + interpret_env(param) else begin - PPFile.Insert(current,ForceExtension(Para,'pp')); + PPFile.Insert(current,ForceExtension(Param,'pp')); inc(current); end; end;