Chromium Code Reviews

Side by Side Diff: third_party/xdg-utils/tests/xdg-desktop-menu/t.14-menu_install_category

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
Property Changes:
Name: svn:executable
+ *
OLDNEW
(Empty)
1 #!/bin/bash
2
3 ## Include utility functions.
4 . "$XDG_TEST_DIR/include/testassertions.sh"
5 . "$XDG_TEST_DIR/include/testcontrol.sh"
6
7 ## Test function
8 test_menu_install_category() {
9 ## Begin the test.
10 test_start "$FUNCNAME: verify that the menu properly supports the '$CATEGORY' ca tegory"
11
12 # Dependencies section
13 test_init
14
15 # Generate .desktop file
16 #USERPATH="$HOME/.local"
17
18 set_no_display
19
20 use_file "$XDG_TEST_DIR/xdg-desktop-menu/data/menu_item_category.desktop" DESKTO P
21 edit_file "$DESKTOP" 'xdg-test-menu-item-install.tmp' CREATEFILE
22 edit_file "$DESKTOP" 'Test Menu Categories' ITEM_TEXT "TEST $XDG_TEST_SHORTID"
23 edit_file "$DESKTOP" 'Development' TMP "$CATEGORY"
24 edit_file "$DESKTOP" '/tmp' WORK_DIR "$XDG_TEST_TMPDIR"
25
26 assert_file "$DESKTOP"
27
28 # Verify the test icon is not installed already.
29 #assert_file_not_in_path "$DESKTOP" "$USERPATH"
30
31 # Test steps section
32 test_procedure
33
34 assert_exit 0 xdg-desktop-menu install "$DESKTOP"
35 assert_nostdout
36 assert_nostderr
37
38 #assert_file_in_path "$DESKTOP" "$USERPATH"
39
40 #if [ -z "$XDG_TEST_NO_INTERACTIVE" -a `whoami` != 'root' ]; then
41
42 assert_interactive "Is an item called '$ITEM_TEXT' somewhere in the menu tree?\n \tThe item is probably in a menu that is related to '$CATEGORY'?" y
43 #fi
44
45 ## Cleanup
46 assert_exit 0 xdg-desktop-menu uninstall "$DESKTOP"
47 assert_nostdout
48 assert_nostderr
49
50 test_result
51 }
52
53 repeat_test test_menu_install_category 1 CATEGORY AudioVideo Game Office System Education Graphics Network Utility
OLDNEW

Powered by Google App Engine