diff options
author | Tom Whipple <tw@tomwhipple.com> | 2006-08-07 22:22:11 +0000 |
---|---|---|
committer | Tom Whipple <tw@tomwhipple.com> | 2006-08-07 22:22:11 +0000 |
commit | ab26cf27d94d9da70cfd8cce20ea7925c66057b5 (patch) | |
tree | fad635a7c405fec75fa2927be4a9e58ea620267a | |
parent | 5bff84e9237f3c73c1bbb8237daa486a0c50d03d (diff) |
update for compatibility
11 files changed, 23 insertions, 38 deletions
diff --git a/tests/xdg-desktop-icon/t.02-plain_file_install b/tests/xdg-desktop-icon/t.02-plain_file_install index 0168bce..9794063 100755 --- a/tests/xdg-desktop-icon/t.02-plain_file_install +++ b/tests/xdg-desktop-icon/t.02-plain_file_install @@ -18,9 +18,10 @@ set_no_display echo "Some more boring text. $XDG_TEST_ID" > "$INSFILE" assert_file "$INSFILE" +DESKTOP=`find $HOME -type d -a -name Desktop` # Verify the test icon is not installed already. -assert_file_not_in_path "$INSFILE" "$HOME/Desktop" +assert_file_not_in_path "$INSFILE" "$DESKTOP" # Test steps section test_procedure @@ -29,7 +30,7 @@ assert_exit 0 xdg-desktop-icon install "$INSFILE" assert_nostdout assert_nostderr -assert_file_in_path "$INSFILE" "$HOME/Desktop" +assert_file_in_path "$INSFILE" "$DESKTOP" assert_interactive_notroot "Is there an icon on the desktop with name '$INSFILE'?" y diff --git a/tests/xdg-desktop-icon/t.03-plain_file_uninstall b/tests/xdg-desktop-icon/t.03-plain_file_uninstall index bdd7ece..1c073cc 100755 --- a/tests/xdg-desktop-icon/t.03-plain_file_uninstall +++ b/tests/xdg-desktop-icon/t.03-plain_file_uninstall @@ -13,13 +13,15 @@ test_start "$FUNCNAME: verify $FILE is uninstalled correctly from the desktop" test_init INSFILE="xdgtestdata-$XDG_TEST_SHORTID.txt" +DESKTOP=`find $HOME -type d -a -name Desktop` + set_no_display echo "Some more boring text" > "$INSFILE" assert_file "$INSFILE" # Verify the test icon is not installed already. assert_exit 0 xdg-desktop-icon install "$INSFILE" -assert_file_in_path "$INSFILE" "$HOME/Desktop" +assert_file_in_path "$INSFILE" "$DESKTOP" assert_interactive_notroot "Is an icon named '$INSFILE' present on the desktop?" y # Test steps section @@ -29,7 +31,7 @@ assert_exit 0 xdg-desktop-icon uninstall "$INSFILE" assert_nostdout assert_nostderr -assert_file_not_in_path "$INSFILE" "$HOME/Desktop" +assert_file_not_in_path "$INSFILE" "$DESKTOP" assert_interactive_notroot "Is an icon named '$INSFILE' still present on the desktop?" n test_result diff --git a/tests/xdg-desktop-icon/t.04-desktop_icon_install b/tests/xdg-desktop-icon/t.04-desktop_icon_install index 459906e..6bda3c1 100755 --- a/tests/xdg-desktop-icon/t.04-desktop_icon_install +++ b/tests/xdg-desktop-icon/t.04-desktop_icon_install @@ -2,7 +2,6 @@ ## Include utility functions. . "$XDG_TEST_DIR/include/testassertions.sh" - . "$XDG_TEST_DIR/include/testcontrol.sh" ## Test function @@ -18,11 +17,12 @@ use_file "$XDG_TEST_DIR/xdg-desktop-icon/data/desktop_icon_install.desktop" DESK edit_file "$DESK_FILE" 'xdg-test-desktop-icon-install.tmp' CREATE_FILE edit_file "$DESK_FILE" 'Desktop_Icon' ICON_TEXT "Install $XDG_TEST_SHORTID" assert_file "$DESK_FILE" +DESKTOP=`find $HOME -type d -a -name Desktop` set_no_display # Verify the test icon is not installed already. -assert_file_not_in_path "$DESK_FILE" "$HOME/Desktop" +assert_file_not_in_path "$DESK_FILE" "$DESKTOP" assert_nofile "$HOME/$CREATE_FILE" # Test steps section @@ -32,7 +32,7 @@ assert_exit 0 xdg-desktop-icon install "$DESK_FILE" assert_nostdout assert_nostderr -assert_file_in_path "$DESK_FILE" "$HOME/Desktop" +assert_file_in_path "$DESK_FILE" "$DESKTOP" if [ -z "$XDG_TEST_NO_INTERACTIVE" ] && [ `whoami` != root ] ; then assert_interactive "Is there an icon on the desktop with name '$ICON_TEXT'?" y diff --git a/tests/xdg-desktop-icon/t.05-desktop_icon_uninstall b/tests/xdg-desktop-icon/t.05-desktop_icon_uninstall index c0ecdd2..6749dbe 100755 --- a/tests/xdg-desktop-icon/t.05-desktop_icon_uninstall +++ b/tests/xdg-desktop-icon/t.05-desktop_icon_uninstall @@ -2,7 +2,6 @@ ## Include utility functions. . "$XDG_TEST_DIR/include/testassertions.sh" - . "$XDG_TEST_DIR/include/testcontrol.sh" ## Test function @@ -11,6 +10,7 @@ test_desktop_icon_uninstall() { DIR="$XDG_TEST_DIR/xdg-desktop-icon/data" FILE="desktop_icon_install.desktop" test_start "$FUNCNAME: verify desktop file is uninstalled correctly from the desktop" +DESKTOP=`find $HOME -type d -a -name Desktop` # Dependencies section test_init @@ -25,7 +25,7 @@ set_no_display # Verify the test icon is not installed already. assert_exit 0 xdg-desktop-icon install "$XDG_TEST_TMPDIR/$DESK_FILE" -assert_file_in_path "$DESK_FILE" "$HOME/Desktop" +assert_file_in_path "$DESK_FILE" "$DESKTOP" assert_interactive_notroot "Is an icon named '$ICON_TEXT' present on the desktop?" y # Test steps section @@ -35,7 +35,7 @@ assert_exit 0 xdg-desktop-icon uninstall "$DESK_FILE" assert_nostdout assert_nostderr -assert_file_not_in_path "$DESK_FILE" "$HOME/Desktop" +assert_file_not_in_path "$DESK_FILE" "$DESKTOP" assert_interactive_notroot "Is an icon named '$ICON_TEXT' still present on the desktop?" n test_result diff --git a/tests/xdg-desktop-menu/t.10-simple_menu_item_user_install b/tests/xdg-desktop-menu/t.10-simple_menu_item_user_install index 953c808..bfd1f79 100755 --- a/tests/xdg-desktop-menu/t.10-simple_menu_item_user_install +++ b/tests/xdg-desktop-menu/t.10-simple_menu_item_user_install @@ -38,14 +38,7 @@ assert_file_in_path "$DESKTOP" "$USERPATH" if [ -z "$XDG_TEST_NO_INTERACTIVE" -a `whoami` != 'root' ]; then -# TODO: HACK: this shouldn't be necessary. -assert_exit 0 xdg-desktop-menu forceupdate --mode user -if [ "$GDMSESSION" = "kde" ] ; then - assert_interactive_notroot "You are running KDE. Please note that KDE takes time to update it's menus. Please refresh the menu several times prior to answering the following questions." -fi -# end HACK - -assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?" y +assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?\n\t(NOTE: If you are using KDE, it may take a few seconds to appear.)" y assert_interactive "Please select the menu item '$ITEM_TEXT'" ## Double clicking will result in the command 'touch xdg-test-menu-item-install.tmp' to be run diff --git a/tests/xdg-desktop-menu/t.11-simple_menu_item_user_uninstall b/tests/xdg-desktop-menu/t.11-simple_menu_item_user_uninstall index de4f2f4..62a9524 100755 --- a/tests/xdg-desktop-menu/t.11-simple_menu_item_user_uninstall +++ b/tests/xdg-desktop-menu/t.11-simple_menu_item_user_uninstall @@ -27,14 +27,8 @@ assert_exit 0 xdg-desktop-menu install --mode user "$DESKTOP" assert_file_in_path "$DESKTOP" "$USERPATH" -# TODO: HACK: this shouldn't be necessary. -assert_exit 0 xdg-desktop-menu forceupdate --mode user -if [ "$GDMSESSION" = "kde" ] ; then - assert_interactive_notroot "You are running KDE. Please note that KDE takes time to update it's menus. Please refresh the menu several times prior to answering the following questions." -fi -# end HACK -assert_interactive_notroot "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?" y +assert_interactive_notroot "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?\n\t(NOTE: If you are using KDE, it may take a few seconds to appear.)" y # Test steps section test_procedure @@ -45,7 +39,7 @@ assert_nostderr assert_file_not_in_path "$DESKTOP" "$USERPATH" -assert_interactive_notroot "Is the menu item '$ITEM_TEXT' still present?" n +assert_interactive_notroot "Is the menu item '$ITEM_TEXT' still present?\n\t(NOTE: If you are using KDE, it may take a few seconds to disappear.)" n test_failoverride WARN test_result diff --git a/tests/xdg-desktop-menu/t.13-menu_user_uninstall b/tests/xdg-desktop-menu/t.13-menu_user_uninstall index b2ea2e2..dbdcffe 100755 --- a/tests/xdg-desktop-menu/t.13-menu_user_uninstall +++ b/tests/xdg-desktop-menu/t.13-menu_user_uninstall @@ -47,12 +47,7 @@ assert_file_in_path "$DESKTOP" "$USERPATH2" assert_file_in_path "$DIRECTORY" "$USERPATH" assert_file_in_path "$MENU" "$USERPATH" -if [ "$GDMSESSION" = "kde" ] ; then - # TODO: HACK: this shouldn't be necessary. - assert_interactive_notroot "You are running KDE. Please note that KDE takes time to update it's menus. Please refresh the menu several times prior to answering the following questions." -fi - -assert_interactive_notroot "Is the menu '<main>/$MENU_NAME present with items 'EXTRA_ITEM' and '$ITEM_TEXT'" y +assert_interactive_notroot "Is the menu '<main>/$MENU_NAME present with items 'EXTRA_ITEM' and '$ITEM_TEXT'\n\t(NOTE: If you are using KDE, it may take a few seconds to appear.)" y # Test steps section test_procedure diff --git a/tests/xdg-desktop-menu/t.20-simple_menu_item_system_install b/tests/xdg-desktop-menu/t.20-simple_menu_item_system_install index 86ff7cd..96e737a 100755 --- a/tests/xdg-desktop-menu/t.20-simple_menu_item_system_install +++ b/tests/xdg-desktop-menu/t.20-simple_menu_item_system_install @@ -38,7 +38,7 @@ assert_nostderr assert_file_in_path "$DESKTOP" "$USERPATH" if [ -z "$XDG_TEST_NO_INTERACTIVE" ]; then -assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?\n(NOTE: If you are using KDE, it may take a few seconds to appear.)" y +assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?\n\t(NOTE: If you are using KDE, it may take a few seconds to appear.)" y assert_interactive "Please select the menu item '$ITEM_TEXT'" ## Double clicking will result in the command 'touch xdg-test-menu-item-install.tmp' to be run diff --git a/tests/xdg-desktop-menu/t.21-simple_menu_item_system_uninstall b/tests/xdg-desktop-menu/t.21-simple_menu_item_system_uninstall index 0a10e62..4703a5e 100755 --- a/tests/xdg-desktop-menu/t.21-simple_menu_item_system_uninstall +++ b/tests/xdg-desktop-menu/t.21-simple_menu_item_system_uninstall @@ -27,7 +27,7 @@ assert_file "$DESKTOP" assert_exit 0 xdg-desktop-menu install --mode system "$DESKTOP" assert_file_in_path "$DESKTOP" "$USERPATH" -assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?\n(NOTE: If you are using KDE, it may take a few seconds to appear.)" y +assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree, possibly in a generic location?\n\t(NOTE: If you are using KDE, it may take a few seconds to appear.)" y # Test steps section @@ -39,7 +39,7 @@ assert_nostderr assert_file_not_in_path "$DESKTOP" "$USERPATH" -assert_interactive "Is the menu item '$ITEM_TEXT' still present?\n(NOTE: see above about KDE)" n +assert_interactive "Is the menu item '$ITEM_TEXT' still present?\n\t(NOTE: see above about KDE)" n # Desktop file not totally OK. test_failoverride WARN diff --git a/tests/xdg-desktop-menu/t.22-menu_system_install b/tests/xdg-desktop-menu/t.22-menu_system_install index 63a4c7b..4e2f358 100755 --- a/tests/xdg-desktop-menu/t.22-menu_system_install +++ b/tests/xdg-desktop-menu/t.22-menu_system_install @@ -74,7 +74,7 @@ assert_file_in_path "$MENU" "$USERPATH" if [ -z "$XDG_TEST_NO_INTERACTIVE" ]; then -assert_interactive "Is there a menu in <main> called '$MENU_NAME'?\n(NOTE: If you are using KDE, it may take a few seconds for the menu to appear.)" y +assert_interactive "Is there a menu in <main> called '$MENU_NAME'?\n\t(NOTE: If you are using KDE, it may take a few seconds for the menu to appear.)" y assert_interactive "Are there exactly 2 items in '<main>/$MENU_NAME' called 'EXTRA ITEM' and '$ITEM_TEXT'?" y assert_interactive "Please select the menu item '<main>/$MENU_NAME/$ITEM_TEXT'" diff --git a/tests/xdg-desktop-menu/t.23-menu_system_uninstall b/tests/xdg-desktop-menu/t.23-menu_system_uninstall index 421f831..810dae9 100755 --- a/tests/xdg-desktop-menu/t.23-menu_system_uninstall +++ b/tests/xdg-desktop-menu/t.23-menu_system_uninstall @@ -54,7 +54,7 @@ assert_file_in_path "$DESKTOP" "$USERPATH2" assert_file_in_path "$DIRECTORY" "$USERPATH" assert_file_in_path "$MENU" "$USERPATH" -assert_interactive "Is the menu '<main>/$MENU_NAME present with items 'EXTRA_ITEM' and '$ITEM_TEXT'.\n(NOTE: If you are using KDE, it may take a few seconds to appear.)" y +assert_interactive "Is the menu '<main>/$MENU_NAME present with items 'EXTRA_ITEM' and '$ITEM_TEXT'.\n\t(NOTE: If you are using KDE, it may take a few seconds to appear.)" y # Test steps section test_procedure @@ -84,7 +84,7 @@ assert_file_not_in_path "$DESKTOP2" "$USERPATH" assert_file_not_in_path "$DIRECTORY" "$USERPATH" assert_file_not_in_path "$MENU" "$USERPATH" -assert_interactive "Is the menu '<main>/$MENU_NAME' still present?\n(NOTE: If you are using KDE, it may take a few seconds to disappear.)" n +assert_interactive "Is the menu '<main>/$MENU_NAME' still present?\n\t(NOTE: If you are using KDE, it may take a few seconds to disappear.)" n assert_interactive "Is '$ITEM_TEXT' present anywhere in the menu tree?" n test_result |