lazarus-ccr/components/cmdlinecfg/trunk/testcompconfread.pas
skalogryz 6ee63d67b1 cmdlinecfg: the initial files commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2802 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-10-02 03:46:44 +00:00

30 lines
517 B
ObjectPascal

program testcompconfread;
{$mode delphi}{$H+}
uses
SysUtils, Classes, cmdlinecfg, cmdlinecfgjson, cmdlinecfgutils
{ you can add units after this };
var
cfg : TCmdLineCfg;
begin
if Paramcount=0 then begin
writeln('please provide the configuration file name');
exit;
end;
try
cfg := TCmdLineCfg.Create;
try
CmdLineCfgJSONReadFile(ParamStr(1), cfg);
CmdLineDebug(cfg);
finally
cfg.Free;
end;
except
on e: Exception do
writeln(e.message);
end;
end.