3
## Include utility functions.
4
. "$XDG_TEST_DIR/include/testassertions.sh"
6
. "$XDG_TEST_DIR/include/testcontrol.sh"
9
test_icon_user_install() {
10
test_start "$FUNCNAME: verify $ICON is installed correctly"
13
userpath="$HOME/.icons:$HOME/.local:$XDG_DATA_HOME"
15
# Dependencies section
19
use_file "$XDG_TEST_DIR/icons/$ICON" ICONFILE
20
assert_file "$ICONFILE"
22
# Verify the test icon is not installed already.
23
assert_file_not_in_path "$ICONFILE" "$userpath"
28
assert_exit 0 xdg-icon-resource install --mode user --size "$SIZE" "$ICONFILE"
32
assert_file_in_path "$ICONFILE" "$userpath"
34
xdg-icon-resource uninstall --mode user --size "$SIZE" "$ICONFILE"
39
repeat_test test_icon_user_install 2 ICON SIZE 'red-16.png' 'red-22.png' 'red-24.png' 'red-32.png' 'red-48.png' 'red-64.png' 'red-128.png' 16 22 24 32 48 64 128