Index: third_party/xdg-utils/tests/xdg-open/t.04-open_html |
=================================================================== |
--- third_party/xdg-utils/tests/xdg-open/t.04-open_html (revision 0) |
+++ third_party/xdg-utils/tests/xdg-open/t.04-open_html (revision 0) |
@@ -0,0 +1,34 @@ |
+#!/bin/bash |
+ |
+## Include utility functions. |
+. "$XDG_TEST_DIR/include/testassertions.sh" |
+. "$XDG_TEST_DIR/include/testcontrol.sh" |
+ |
+## Test function |
+FILE=testfile.html |
+test_open_html() { |
+test_start "$FUNCNAME: open '$PRE$FILE'" |
+ |
+test_init |
+ |
+require_notroot |
+ |
+## Require a running X server |
+assert_display |
+ |
+echo '<html><body>I am an HTML file!</body></html>' >"$FILE" |
+assert_file "$FILE" |
+ |
+test_procedure |
+ |
+assert_exit 0 xdg-open "$PRE$FILE" |
+assert_nostdout |
+assert_nostderr |
+ |
+assert_interactive "Did an HTML file open containing the text 'I am an HTML file!'?" y |
+assert_interactive "Please close any windows opened by this test." C |
+ |
+test_result |
+} |
+ |
+repeat_test test_open_html 1 PRE '' './' |
Property changes on: third_party/xdg-utils/tests/xdg-open/t.04-open_html |
___________________________________________________________________ |
Name: svn:executable |
+ * |