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

Side by Side Diff: third_party/xdg-utils/tests/xdg-icon-resource/t.icon_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_icon_system_as_nonroot() {
10 ICON_PATH="$HOME/.icons:${XDG_DATA_DIRS-/usr/local/share:/usr/share}:/usr/share/ pixmaps:$HOME/.local/icons:$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/icons/red-32.png" ICONFILE
22 assert_file "$ICONFILE"
23
24 # Verify the test icon is not installed already.
25 assert_file_not_in_path "$ICONFILE" "$ICON_PATH"
26
27 # Test steps section
28 test_procedure
29
30 assert_exit 3 xdg-icon-resource install --mode system --size 32 "$ICONFILE"
31 assert_nostdout
32 assert_stderr
33
34 assert_file_not_in_path "$ICONFILE" "$ICON_PATH"
35
36 assert_exit 3 xdg-icon-resource uninstall --mode system --size 32 "$ICONFILE"
37 assert_nostdout
38 assert_stderr
39
40 test_result
41 }
42 run_test test_icon_system_as_nonroot
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698