refactor: skip wl-clipboard test when not on wayland but wl-clipboard is installed

This commit is contained in:
sithlord48
2025-11-21 06:30:04 -05:00
committed by Chris Rizzitello
parent 525123573e
commit fb119f3c56

View File

@ -7,6 +7,7 @@
#include "WlClipboardTests.h"
#include "base/LogLevel.h"
#include "common/PlatformInfo.h"
#include "deskflow/ClipboardTypes.h"
#include "platform/WlClipboard.h"
@ -41,6 +42,11 @@ void WlClipboardTests::initTestCase()
m_arch.init();
m_log.setFilter(LogLevel::Debug2);
// Only run tests if Wayland clipboard tools are available
if (!deskflow::platform::isWayland()) {
QSKIP("not running on wayland skipping Wayland clipboard tests");
}
// Only run tests if Wayland clipboard tools are available
if (!WlClipboard::isAvailable()) {
QSKIP("wl-clipboard tools not available, skipping Wayland clipboard tests");