aboutsummaryrefslogtreecommitdiffstats
path: root/tests/entries.bats
diff options
context:
space:
mode:
authorJakub Jabůrek <jaburek.jakub@gmail.com>2021-05-09 12:39:59 +0200
committerJakub Jabůrek <jaburek.jakub@gmail.com>2021-05-09 12:39:59 +0200
commit6fd48c02160e65b9f64fe0adf778be83a4a603ce (patch)
treebc66b2208a1d126b2bb888bb0146a0bf40fec6ef /tests/entries.bats
parentfda862a4d5958fa4fbc9668b99339c7a1e584584 (diff)
downloadsway-launcher-desktop-6fd48c02160e65b9f64fe0adf778be83a4a603ce.tar.gz
sway-launcher-desktop-6fd48c02160e65b9f64fe0adf778be83a4a603ce.zip
Hide applications with NoDisplay=true
Diffstat (limited to 'tests/entries.bats')
-rwxr-xr-xtests/entries.bats12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/entries.bats b/tests/entries.bats
index 0b50876..763dda7 100755
--- a/tests/entries.bats
+++ b/tests/entries.bats
@@ -22,12 +22,20 @@
@test "Wildcard expansion works for extraction of desktop files" {
run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/*.desktop
[ "$status" -eq 0 ]
- [[ ${#lines[@]} == 8 ]]
+ [[ ${#lines[@]} == 9 ]]
}
@test "Reoccurring desktop file ids are not parsed twice" {
run ../sway-launcher-desktop.sh entries data/desktop-files/**/*.desktop
echo "EXPECTED: foo-bar.desktop ACTUAL: $output"
[ "$status" -eq 0 ]
- [[ ${#lines[@]} == 8 ]]
+ [[ ${#lines[@]} == 9 ]]
+}
+
+@test "Hidden desktop entries are ignored" {
+ run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/*vim.desktop
+ [ "$status" -eq 0 ]
+ [[ ${#lines[@]} == 1 ]]
+ [[ ${lines[0]} =~ data/desktop-files/0/applications/nvim.desktop ]]
+ [[ ${lines[0]} =~ ^data/desktop-files/0/applications/nvim.desktop.*Neovim.*(New File).*new-file ]]
}