blob: e6781edccab1606583a08007a931e5bbd1df404e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
@test "Firefox desktop entry and all its actions are extracted" {
run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/firefox.desktop
echo -e "OUTPUT:\n$output"
[ "$status" -eq 0 ]
[[ ${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-files/0/applications/*.desktop
[ "$status" -eq 0 ]
[[ ${#lines[@]} == 6 ]]
}
@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[@]} == 6 ]]
}
|