aboutsummaryrefslogtreecommitdiffstats
path: root/tests/generate-command.bats
diff options
context:
space:
mode:
authorMoritz Meißelbach <arbelzapf@gmail.com>2020-02-06 23:57:42 +0100
committerMoritz Meißelbach <arbelzapf@gmail.com>2020-02-06 23:57:42 +0100
commitaefd5ae9bc87a56081462ee56c50f5ba722d26e7 (patch)
treeba9a3b66d0c095e206070c1776ad17ff62666199 /tests/generate-command.bats
parentc1632f9797936a46587bf959a8be07c23768ca13 (diff)
downloadsway-launcher-desktop-aefd5ae9bc87a56081462ee56c50f5ba722d26e7.tar.gz
sway-launcher-desktop-aefd5ae9bc87a56081462ee56c50f5ba722d26e7.zip
Add function to list and execute application desktop files from XDG autostart folders. Fixes #16
Diffstat (limited to 'tests/generate-command.bats')
-rw-r--r--tests/generate-command.bats9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/generate-command.bats b/tests/generate-command.bats
index dfe2487..1dccc13 100644
--- a/tests/generate-command.bats
+++ b/tests/generate-command.bats
@@ -1,3 +1,7 @@
+setup() {
+ export TERMINAL_COMMAND='urxvt -e'
+}
+
@test "Exec command is properly extracted from Firefox desktop file" {
run ../sway-launcher-desktop.sh generate-command data/desktop-files/0/applications/firefox.desktop
[ "$status" -eq 0 ]
@@ -6,8 +10,11 @@
@test "Exec command is properly generated from htop desktop file" {
run ../sway-launcher-desktop.sh generate-command data/desktop-files/0/applications/htop.desktop
+ expected='urxvt -e htop'
+ echo "EXPECTED: $expected"
+ echo "ACTUAL: $output"
[ "$status" -eq 0 ]
- [[ "$output" == 'urxvt -e htop' ]]
+ [[ "$output" == $expected ]]
}
@test "Exec command is properly generated from minecraft-launcher desktop file" {