summaryrefslogtreecommitdiff
path: root/packages/fcl-xml/tests/testxmlconf.lpr
blob: e934f8d11f12dcb74ee0a06bcbba60b1ee99e7fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
program testxmlconf;

uses xmlconf;

begin
  With TXMLConfig.Create(Nil) do
  try
    FileName:='test.xml';
    OpenKey('General');
    SetValue('one',1);
    SetValue('two',2);
    SetValue('extra/name','michael');
    Flush;
  finally
    Free;
  end;
  With TXMLConfig.Create(Nil) do
  try
    FileName:='test.xml';
    OpenKey('General');
    If GetValue('one',0)<>1 then
      Writeln('One does not match');
    If GetValue('two',0)<>2 then
      Writeln('Two does not match');
    if GetValue('extra/name','')<>'michael' then
      Writeln('Name does not match');
  finally
    Free;
  end;
end.