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

Unified Diff: third_party/xdg-utils/tests/xdg-mime/t.02-query_missing_file

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/xdg-utils/tests/xdg-mime/t.02-query_missing_file
===================================================================
--- third_party/xdg-utils/tests/xdg-mime/t.02-query_missing_file (revision 0)
+++ third_party/xdg-utils/tests/xdg-mime/t.02-query_missing_file (revision 0)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+. "$XDG_TEST_DIR/include/testassertions.sh"
+
+. "$XDG_TEST_DIR/include/testcontrol.sh"
+
+test_query_missing_file() {
+INPUT_FILE='non-existant-file.xml'
+
+test_start "$FUNCNAME: verify correct error for missing file: $INPUT_FILE"
+test_purpose "Verify that the correct error is generated when the mime file is missing. This is bug 7123 case 1"
+
+## Check dependencies
+test_init
+
+# query requires a desktop environment
+require_notroot
+assert_nofile "$INPUT_FILE"
+
+## Main test
+test_procedure
+
+assert_exit 2 xdg-mime query filetype "$INPUT_FILE"
+assert_stderr
+assert_nostdout
+
+test_result
+}
+
+run_test test_query_missing_file
Property changes on: third_party/xdg-utils/tests/xdg-mime/t.02-query_missing_file
___________________________________________________________________
Name: svn:executable
+ *

Powered by Google App Engine
This is Rietveld 408576698