aboutsummaryrefslogtreecommitdiffstats
path: root/tests/entries.bats
diff options
context:
space:
mode:
authorMoritz Meißelbach <arbelzapf@gmail.com>2019-11-08 21:25:28 +0100
committerGitHub <noreply@github.com>2019-11-08 21:25:28 +0100
commit8b8c4b3bf7e6053061aafb880bb7084cea6ef6f4 (patch)
tree9b63ea96eea4476fc3676581d5d31afc75b26946 /tests/entries.bats
parentac656f120a12e3521c4cabbc96e0363f746193a4 (diff)
parent9dc1986ab0aa0021d4a2c74e39bd5913a8f7141b (diff)
downloadsway-launcher-desktop-8b8c4b3bf7e6053061aafb880bb7084cea6ef6f4.tar.gz
sway-launcher-desktop-8b8c4b3bf7e6053061aafb880bb7084cea6ef6f4.zip
Merge pull request #4 from Biont/desktop_file_ids
Follow some more XDG Base Directory specifications, resulting in duplicate entries no longer showing up and support of custom/extended XDG_DATA_DIRS setups
Diffstat (limited to 'tests/entries.bats')
-rw-r--r--tests/entries.bats20
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/entries.bats b/tests/entries.bats
index 304dc6a..de18891 100644
--- a/tests/entries.bats
+++ b/tests/entries.bats
@@ -1,14 +1,22 @@
@test "Firefox desktop entry and all its actions are extracted" {
- run ../sway-launcher-desktop.sh entries data/firefox.desktop
+ run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/firefox.desktop
+ echo -e "OUTPUT:\n$output"
[ "$status" -eq 0 ]
- [[ ${lines[0]} =~ data/firefox.desktop ]]
- [[ ${lines[0]} =~ ^data/firefox.desktop.*Firefox ]]
- [[ ${lines[1]} =~ ^data/firefox.desktop.*Firefox.*(New Window).*new-window ]]
- [[ ${lines[2]} =~ ^data/firefox.desktop.*Firefox.*(New Private Window).*new-private-window ]]
+ [[ ${lines[0]} =~ data/desktop-files/0/applications/firefox.desktop ]]
+ [[ ${lines[0]} =~ ^data/desktop-files/0/applications/firefox.desktop.*Firefox ]]
+ [[ ${lines[1]} =~ ^data/desktop-files/0/applications/firefox.desktop.*Firefox.*(New Window).*new-window ]]
+ [[ ${lines[2]} =~ ^data/desktop-files/0/applications/firefox.desktop.*Firefox.*(New Private Window).*new-private-window ]]
}
@test "Wildcard expansion works for extraction of desktop files" {
- run ../sway-launcher-desktop.sh entries data/*.desktop
+ run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/*.desktop
+ [ "$status" -eq 0 ]
+ [[ ${#lines[@]} == 5 ]]
+}
+
+@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[@]} == 5 ]]
} \ No newline at end of file