From aefd5ae9bc87a56081462ee56c50f5ba722d26e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Mei=C3=9Felbach?= Date: Thu, 6 Feb 2020 23:57:42 +0100 Subject: Add function to list and execute application desktop files from XDG autostart folders. Fixes #16 --- tests/autostart.bats | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/autostart.bats (limited to 'tests/autostart.bats') 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 -- cgit v1.2.3