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

Unified Diff: third_party/xdg-utils/tests/xdg-mime/t.01-query_text_plain

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.01-query_text_plain
===================================================================
--- third_party/xdg-utils/tests/xdg-mime/t.01-query_text_plain (revision 0)
+++ third_party/xdg-utils/tests/xdg-mime/t.01-query_text_plain (revision 0)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. "$XDG_TEST_DIR/include/testassertions.sh"
+. "$XDG_TEST_DIR/include/testcontrol.sh"
+
+test_query_text_plain() {
+# TODO: expand to cover file weirdness.
+INPUT_FILE='testfile.txt'
+
+test_start "$FUNCNAME: verify a query against $INPUT_FILE returns 'text/plain'"
+test_purpose "Verify that the basic query (text/plain) is working."
+
+## Check dependencies
+test_init
+
+require_notroot
+
+echo 'This is some text.' > $INPUT_FILE
+assert_file "$INPUT_FILE"
+
+echo 'text/plain' > out.plain
+
+## Main test
+test_procedure
+
+assert_exit 0 xdg-mime query filetype "$INPUT_FILE"
+assert_stdout out.plain
+assert_nostderr
+
+
+test_result
+}
+
+run_test test_query_text_plain
Property changes on: third_party/xdg-utils/tests/xdg-mime/t.01-query_text_plain
___________________________________________________________________
Name: svn:executable
+ *
« no previous file with comments | « third_party/xdg-utils/tests/xdg-mime/t.00-apply_generic ('k') | third_party/xdg-utils/tests/xdg-mime/t.02-query_missing_file » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698