- 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
27 lines
692 B
C++
27 lines
692 B
C++
#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"
|