diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-03-30 15:57:06 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-03-30 15:57:06 +0200 |
commit | 8b8c30fc84d107bf4ec13e3d06f1ea81e1001f97 (patch) | |
tree | 2e9d6d5c318f1b20eb9a57e51de95b9e8cdd068a /tests/tst_utils.cpp | |
parent | 73bd95fde4364cd7e881ce27321e509159704901 (diff) | |
parent | 18179a11648f23599e7c3a27d56680884d7c0f0f (diff) | |
download | libayatana-common-8b8c30fc84d107bf4ec13e3d06f1ea81e1001f97.tar.gz libayatana-common-8b8c30fc84d107bf4ec13e3d06f1ea81e1001f97.tar.bz2 libayatana-common-8b8c30fc84d107bf4ec13e3d06f1ea81e1001f97.zip |
Merge branch 'tari01-pr/add-budgie'
Attributes GH PR #9: https://github.com/AyatanaIndicators/libayatana-common/pull/9
Diffstat (limited to 'tests/tst_utils.cpp')
-rw-r--r-- | tests/tst_utils.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/tst_utils.cpp b/tests/tst_utils.cpp index d7a4946..503afc9 100644 --- a/tests/tst_utils.cpp +++ b/tests/tst_utils.cpp @@ -1,5 +1,6 @@ /* * Copyright 2021 Marius Gripsgard <marius@ubports.com> + * Copyright 2021 Robert Tari <robert@tari.in> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -22,15 +23,15 @@ extern "C" { } class XdgCurrentDesktopUtilsTest : public ::testing::Test -{ -public: - XdgCurrentDesktopUtilsTest() {} +{ +public: + XdgCurrentDesktopUtilsTest() {} - void SetUp() { + void SetUp() { unsetenv("XDG_CURRENT_DESKTOP"); } - void TearDown() { + void TearDown() { unsetenv("XDG_CURRENT_DESKTOP"); } }; @@ -72,3 +73,9 @@ TEST_F(XdgCurrentDesktopUtilsTest, isPantheon) setenv("XDG_CURRENT_DESKTOP", "PANTHEON", 1); EXPECT_TRUE(is_pantheon()); } +TEST_F(XdgCurrentDesktopUtilsTest, isBudgie) +{ + EXPECT_FALSE(is_budgie()); + setenv("XDG_CURRENT_DESKTOP", "Budgie:GNOME", 1); + EXPECT_TRUE(is_budgie()); +} |