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

Unified Diff: third_party/xdg-utils/tests/xdg-desktop-icon/t.01-notexist_file_uninstall

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-desktop-icon/t.01-notexist_file_uninstall
===================================================================
--- third_party/xdg-utils/tests/xdg-desktop-icon/t.01-notexist_file_uninstall (revision 0)
+++ third_party/xdg-utils/tests/xdg-desktop-icon/t.01-notexist_file_uninstall (revision 0)
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+## Include utility functions.
+. "$XDG_TEST_DIR/include/testassertions.sh"
+
+. "$XDG_TEST_DIR/include/testcontrol.sh"
+
+## Test function
+test_notexist_file_uninstall() {
+## Begin the test.
+FILE="pain_file_uninstall.txt"
+test_start "$FUNCNAME: verify uninstalling file does not cause an error if it is not installed."
+
+# Dependencies section
+test_init
+
+get_unique_name INSFILE "$FILE"
+set_no_display
+echo "Some more boring text" > "$INSFILE"
+assert_file "$INSFILE"
+
+# Verify the test icon is not installed already.
+assert_file_not_in_path "$INSFILE" "$HOME/Desktop"
+
+# Test steps section
+test_procedure
+
+assert_exit 0 xdg-desktop-icon uninstall "$INSFILE"
+assert_nostdout
+assert_nostderr
+
+assert_file_not_in_path "$INSFILE" "$HOME/Desktop"
+
+test_result
+}
+
+run_test test_notexist_file_uninstall
Property changes on: third_party/xdg-utils/tests/xdg-desktop-icon/t.01-notexist_file_uninstall
___________________________________________________________________
Name: svn:executable
+ *

Powered by Google App Engine
This is Rietveld 408576698