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

Unified Diff: third_party/xdg-utils/tests/xdg-su/t.02-su_basic

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-su/t.02-su_basic
===================================================================
--- third_party/xdg-utils/tests/xdg-su/t.02-su_basic (revision 0)
+++ third_party/xdg-utils/tests/xdg-su/t.02-su_basic (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
+test_su_basic() {
+test_start "$FUNCNAME: basic su - up-privilege"
+
+test_init
+
+## Require a running X server
+require_notroot
+require_interactive
+
+assert_display
+
+echo "root" >out.expected
+
+test_procedure
+
+assert_interactive "Please make sure there no open password prompt windows.\n\tEnter the admin password when prompted."
+
+assert_exit 0 xdg-su -c 'whoami'
+assert_stdout out.expected
+assert_nostderr
+
+assert_interactive "Were you prompted for the admin password?" y
+
+test_result
+}
+
+run_test test_su_basic
Property changes on: third_party/xdg-utils/tests/xdg-su/t.02-su_basic
___________________________________________________________________
Name: svn:executable
+ *
« no previous file with comments | « third_party/xdg-utils/tests/xdg-su/t.01-su_basic_asroot ('k') | third_party/xdg-utils/tests/xdg-su/t.03-su_badpass » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698