aboutsummaryrefslogtreecommitdiffstats
path: root/tests/autostart.bats
diff options
context:
space:
mode:
authorMoritz Meißelbach <arbelzapf@gmail.com>2020-02-06 23:09:03 +0100
committerGitHub <noreply@github.com>2020-02-06 23:09:03 +0100
commit80b9323b479740782cf7ba11a762f5e8ee5ef03e (patch)
treec659c5442e01f5aaa61c85e6a5a8570ac1f5269b /tests/autostart.bats
parentc1632f9797936a46587bf959a8be07c23768ca13 (diff)
parent2f0c53eac739a2a6dbf574cebb543c932f7dc162 (diff)
downloadsway-launcher-desktop-80b9323b479740782cf7ba11a762f5e8ee5ef03e.tar.gz
sway-launcher-desktop-80b9323b479740782cf7ba11a762f5e8ee5ef03e.zip
Merge pull request #18 from Biont/xdg_autostart
Implement XDG Autostart specification
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