From bade890df59fcdb17c7059ea18aed14d344463cb Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 19 Jan 2021 17:10:55 +0000 Subject: [PATCH] * tregistry2 test: Delete reg.xml and the app config dir. git-svn-id: trunk@48205 - (cherry picked from commit 9fd0f94d7ca41dd8656324d4920d7030631555b3) --- tests/test/packages/fcl-registry/tregistry2.pp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/test/packages/fcl-registry/tregistry2.pp b/tests/test/packages/fcl-registry/tregistry2.pp index db9c13ee2f..301883777d 100644 --- a/tests/test/packages/fcl-registry/tregistry2.pp +++ b/tests/test/packages/fcl-registry/tregistry2.pp @@ -1,6 +1,7 @@ { This unit tests mostly TRegIniFile to work properly and be Delphi compatible. - Please keep this unit Delphi compatible. + This test also runs on non-Windows platforms where XML registry is used. + Please keep this test Delphi compatible. } {$ifdef FPC} {$mode delphi} {$endif} @@ -205,6 +206,19 @@ begin end; end; +procedure DeleteUserXmlFile; begin - DoRegTest2; +{$ifdef FPC} + DeleteFile(Includetrailingpathdelimiter(GetAppConfigDir(False))+'reg.xml'); + RemoveDir(GetAppConfigDir(False)); +{$endif FPC} +end; + +begin + try + DoRegTest2; + finally + DeleteUserXmlFile; + end; end. +