Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: third_party/xdg-utils/tests/xdg-desktop-menu/t.02-menu_system_as_nonroot

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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | 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
6 . "$XDG_TEST_DIR/include/testcontrol.sh"
7
8 ## Test function
9 test_menu_system_as_nonroot() {
10 USERPATH="${XDG_DATA_DIRS-/usr/local/share:/usr/share}:$HOME/.local:$HOME/.confi g:$XDG_DATA_HOME"
11
12 ## Begin the test.
13 test_start "$FUNCNAME: verify error for --mode system when run as a normal user"
14
15 # Dependencies section
16 test_init
17
18 require_notroot
19 set_no_display
20
21 use_file "$XDG_TEST_DIR/xdg-desktop-menu/data/menu_item_test.desktop" DESKTOP
22 edit_file "$DESKTOP" 'xdg-test-menu-item-install.tmp' CREATEFILE
23 assert_file "$DESKTOP"
24
25 # Test steps section
26 test_procedure
27
28 assert_exit 3 xdg-desktop-menu install --mode system "$DESKTOP"
29 assert_nostdout
30 assert_stderr
31
32 assert_file_not_in_path "$DESKTOP" "$USERPATH"
33
34 assert_exit 3 xdg-desktop-menu uninstall --mode system "$DESKTOP"
35 assert_nostdout
36 assert_stderr
37
38 test_result
39 }
40 run_test test_menu_system_as_nonroot
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698