aboutsummaryrefslogtreecommitdiffstats
path: root/tests/autostart.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/autostart.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/autostart.bats')
-rw-r--r--tests/autostart.bats14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/autostart.bats b/tests/autostart.bats
new file mode 100644
index 0000000..0197a30
--- /dev/null
+++ b/tests/autostart.bats
@@ -0,0 +1,14 @@
+setup() {
+ export TERMINAL_COMMAND='urxvt -e'
+ export XDG_CONFIG_HOME=./data/autostart-folders/0
+ export XDG_CONFIG_DIRS=./data/autostart-folders/1
+}
+
+@test "Lists all desktop filenames in autostart directories" {
+ run ../sway-launcher-desktop.sh list-autostart
+ echo -e "OUTPUT:\n$output"
+ [ "$status" -eq 0 ]
+ [[ ${#lines[@]} == 2 ]]
+ [[ ${lines[0]} =~ data/autostart-folders/0/autostart/firefox.desktop ]]
+ [[ ${lines[1]} =~ data/autostart-folders/1/autostart/htop.desktop ]]
+} \ No newline at end of file