| 1 |
#!/bin/sh -e |
| 2 |
# UI test |
| 3 |
# (C) 2026 Osamu Aoki <[email protected]>, GPL-2+ |
| 4 |
# |
| 5 |
# test_find_item_in_list |
| 6 |
test_find_item_in_list () { |
| 7 |
im-config -t find_item_in_list "$1" "$2" && echo -n "TRUE" || echo -n "FALSE" |
| 8 |
printf "\t expected '%s'\t for ITEM='%s' \tLIST='%s'\n" "$3" "$1" "$2" |
| 9 |
} |
| 10 |
|
| 11 |
test_find_item_in_list "" "" "FALSE" |
| 12 |
test_find_item_in_list "" "GNOME" "FALSE" |
| 13 |
test_find_item_in_list "" "ANY" "FALSE" |
| 14 |
test_find_item_in_list "" "except:GNOME" "FALSE" |
| 15 |
test_find_item_in_list "GNOME" "" "FALSE" |
| 16 |
test_find_item_in_list "GNOME" "GNOME" "TRUE" |
| 17 |
test_find_item_in_list "GNOME" "A:B" "FALSE" |
| 18 |
test_find_item_in_list "GNOME" "A:GNOME" "TRUE" |
| 19 |
test_find_item_in_list "GNOME" "ANY" "TRUE" |
| 20 |
test_find_item_in_list "GNOME" "except:GNOME" "FALSE" |
| 21 |
test_find_item_in_list "GNOME" "except:KDE:GNOME" "FALSE" |
| 22 |
test_find_item_in_list "XFCE" "except:KDE:GNOME" "TRUE" |