From 3589e6d3f1b2d147f417b0bdb08faa387a80e7aa Mon Sep 17 00:00:00 2001
From: Lukas Holecek <hluk@email.cz>
Date: Sun, 19 Apr 2020 20:04:54 +0200
Subject: [PATCH] Tests: Add test to verify style sheets for main window

Signed-off-by: Lukas Holecek <hluk@email.cz>
---
 src/tests/tests.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp
index e3ae2b936..a9344b6da 100644
--- a/src/tests/tests.cpp
+++ b/src/tests/tests.cpp
@@ -1553,6 +1553,16 @@ void Tests::commandLoadTheme()
         tmp.close();
         RUN("loadTheme" << tmp.fileName(), "");
     }
+
+    // Verify default stylesheets - if there is a syntax error,
+    // application prints a warning which should be captured by tests.
+    {
+        QTemporaryFile tmp;
+        QVERIFY(tmp.open());
+        tmp.write("[General]\nstyle_main_window=true");
+        tmp.close();
+        RUN("loadTheme" << tmp.fileName(), "");
+    }
 }
 
 void Tests::commandDateString()
-- 
GitLab