feat: dual time zones, autostart, tray icon, config relocation, tests
- Dual clock (primary/secondary time zone) with IANA picker, persisted in XML - AutoStartManager: macOS LaunchAgent (com.clouck.clock, RunAtLoad) - Tray icon: template image, light/dark adaptation, toggle + quit menu - ConfigManager: default path moved to QStandardPaths::AppConfigLocation - Qt Test suite (ConfigManager, AutoStartManager) wired into CTest - GitHub origin renamed to upstream; private Gitea repo as origin
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "autostart_manager.h"
|
||||
|
||||
#include <QtTest>
|
||||
|
||||
class AutoStartManagerTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void createsRunAtLoadLaunchAgent();
|
||||
};
|
||||
|
||||
void AutoStartManagerTest::createsRunAtLoadLaunchAgent()
|
||||
{
|
||||
const QString executablePath = "/Applications/Clouck.app/Contents/MacOS/Clouck";
|
||||
const QString contents = AutoStartManager::launchAgentContents(executablePath);
|
||||
|
||||
QVERIFY(contents.contains("<key>ProgramArguments</key>"));
|
||||
QVERIFY(contents.contains(executablePath));
|
||||
QVERIFY(contents.contains("<key>RunAtLoad</key>"));
|
||||
QVERIFY(contents.contains("<true/>"));
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(AutoStartManagerTest)
|
||||
|
||||
#include "autostart_manager_test.moc"
|
||||
Reference in New Issue
Block a user