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

Side by Side Diff: third_party/xdg-utils/tests/xdg-mime/t.13-notexist_mime_uninstall

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_notexist_mime_uninstall() {
10 # TODO: should follow the filename tests.
11 QUERY_FILE="testfile.xdgtest"
12
13 ## Begin the test.
14 test_start "$FUNCNAME: uninstall mime type that is not present"
15
16 # Dependencies section
17 test_init
18
19 require_notroot
20
21 use_file "$XDG_TEST_DIR/xdg-mime/data/testmime.xml" INPUT_FILE
22 edit_file "$INPUT_FILE" "x-xdg-testpattern" TEST_MIME "x-$XDG_TEST_ID"
23 assert_file $INPUT_FILE
24
25 echo "Some text." > $QUERY_FILE
26 assert_file "$QUERY_FILE"
27
28 # Install & verify mime type is installed
29 assert_exit 0 xdg-mime query filetype "$QUERY_FILE" >mimesave.expected
30
31 # Test steps section
32 test_procedure
33
34 assert_exit 0 xdg-mime uninstall --mode user "$INPUT_FILE"
35 assert_nostdout
36 assert_nostderr
37
38 ## Verify no change
39 assert_exit 0 xdg-mime query filetype "$QUERY_FILE"
40 assert_stdout mimesave.expected
41
42 test_result
43 }
44 run_test test_notexist_mime_uninstall
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698