Skip to content

Commit

Permalink
Add dmenu order test
Browse files Browse the repository at this point in the history
  • Loading branch information
bynect committed Nov 4, 2024
1 parent ed3ca10 commit e75515d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/functional-tests/dunstrc.default
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
[global]
icon_path = /usr/share/icons/Papirus/24x24/status/:/usr/share/icons/Papirus/24x24/devices/:/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
# can be appended by script
dmenu = /usr/local/bin/dmenu -l 10 -p dunst:
44 changes: 44 additions & 0 deletions test/functional-tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,49 @@ function hot_reload {
tmp_clean
}

function dmenu_order {
echo "###################################"
echo "dmenu_order"
echo "###################################"

tmp_dunstrc dunstrc.default "sort=urgency"
start_dunst dunstrc.tmp

for i in critical normal low
do
$DUNSTIFY -a "dunst tester" -u $i --action="replyAction,Reply" --action="forwardAction,Forward" "Message Received $i" "Sorted by urgency" &
sleep .5
done

$DUNSTCTL context
keypress

tmp_dunstrc dunstrc.default "sort=update"
start_dunst dunstrc.tmp

for i in critical normal low
do
$DUNSTIFY -a "dunst tester" -u $i --action="replyAction,Reply" --action="forwardAction,Forward" "Message Received $i" "Sorted by time" &
sleep .5
done

$DUNSTCTL context
keypress

tmp_dunstrc dunstrc.default "sort=false"
start_dunst dunstrc.tmp

for i in 69 98 34 1
do
$DUNSTIFY -a "dunst tester" -r $i --action="replyAction,Reply" --action="forwardAction,Forward" "Message Received $i" "Sorted by id" &
sleep .5
done

$DUNSTCTL context
keypress
tmp_clean
}

if [ -n "$1" ]; then
while [ -n "$1" ]; do
$1
Expand All @@ -427,6 +470,7 @@ else
dynamic_height
vertical_align
hot_reload
dmenu_order
fi

killall dunst

0 comments on commit e75515d

Please sign in to comment.