From 6220e3a8aff885409dfe0e9d86b364e4b26fe4be Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Fri, 22 Mar 2024 23:08:16 +0100 Subject: [PATCH] cleanup --- Tests/Tester.pas | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Tests/Tester.pas b/Tests/Tester.pas index 1a0dfd78..2a3a84c0 100644 --- a/Tests/Tester.pas +++ b/Tests/Tester.pas @@ -1116,30 +1116,30 @@ Otp($'WARNING: Not all loaded tests were executed'); foreach var t in all_loaded do - if t.resave_settings then - begin - var sw := new System.IO.StreamWriter(System.IO.File.Create(t.td_fname), enc); - sw.NewLine := #10; - sw.WriteLine; - sw.WriteLine; - - var used_settings := t.used_settings.ToHashSet; - foreach var key in t.all_settings.Keys.Order do - if key not in used_settings then - Otp($'WARNING: Setting {key} was deleted from "{t.td_fname}"', lk_pack_stage_unspecific) else - begin - var val := t.all_settings[key]; - sw.WriteLine; - sw.WriteLine(key); - if not string.IsNullOrWhiteSpace(val) then - sw.WriteLine(val); - end; - - sw.WriteLine; - sw.WriteLine; - sw.Close; - Otp($'WARNING: File "{GetRelativePath(t.td_fname)}" updated', lk_pack_stage_unspecific); - end; + begin +// if not t.resave_settings then continue; + var sw := new System.IO.StreamWriter(System.IO.File.Create(t.td_fname), enc); + sw.NewLine := #10; + sw.WriteLine; + sw.WriteLine; + + var used_settings := t.used_settings.ToHashSet; + foreach var key in t.all_settings.Keys.Order do + if key not in used_settings then + Otp($'WARNING: Setting {key} was deleted from "{t.td_fname}"', lk_pack_stage_unspecific) else + begin + var val := t.all_settings[key]; + sw.WriteLine; + sw.WriteLine(key); + if not string.IsNullOrWhiteSpace(val) then + sw.WriteLine(val); + end; + + sw.WriteLine; + sw.WriteLine; + sw.Close; + Otp($'WARNING: File "{GetRelativePath(t.td_fname)}" updated', lk_pack_stage_unspecific); + end; foreach var td_fname in unused_test_files do case MessageBox.Show($'File "{GetRelativePath(td_fname)}" wasn''t used in any test{#10}Delete it?', 'Unused TestData file', MessageBoxButtons.YesNo) of