[Pkg-shadow-commits] r797 - trunk/tests/su/03
Nicolas FRANCOIS
nekral-guest at costa.debian.org
Sun Jan 15 00:51:47 UTC 2006
Author: nekral-guest
Date: 2006-01-15 00:51:47 +0000 (Sun, 15 Jan 2006)
New Revision: 797
Modified:
trunk/tests/su/03/run.exp
Log:
* Add the test of -l, --login options (same as -).
* -c is no more debian specific.
* make sure getopt reorder the options so that -p can be specified after - or
the username (347747).
Modified: trunk/tests/su/03/run.exp
===================================================================
--- trunk/tests/su/03/run.exp 2006-01-15 00:40:33 UTC (rev 796)
+++ trunk/tests/su/03/run.exp 2006-01-15 00:51:47 UTC (rev 797)
@@ -50,7 +50,20 @@
expect "/home\r\n"
expect "# "
-# Debian specific tests
+# The same with -l/--login
+send "/bin/su -l myuser -c pwd\r"
+expect "/home\r\n"
+expect "# "
+
+send "/bin/su --login -- myuser -c pwd\r"
+expect "/home\r\n"
+expect "# "
+
+send "/bin/su -l myuser -- -c pwd\r"
+expect "/home\r\n"
+expect "# "
+
+# make sure -c is an su option
send "/bin/su -c pwd - myuser\r"
expect "/home\r\n"
expect "# "
@@ -59,6 +72,24 @@
expect "/home\r\n"
expect "# "
+# getopt must reorder the options/non-options
+send "/bin/su -p -c pwd -- - myuser\r"
+expect "/su/03\r\n"
+expect "# "
+send "/bin/su -p -c pwd - myuser\r"
+expect "/su/03\r\n"
+expect "# "
+send "/bin/su -c pwd -p - myuser\r"
+expect "/su/03\r\n"
+expect "# "
+send "/bin/su -c pwd - -p myuser\r"
+expect "/su/03\r\n"
+expect "# "
+send "/bin/su -c pwd - myuser -p\r"
+expect "/su/03\r\n"
+expect "# "
+
+
puts "\nPASS"
exit 0
More information about the Pkg-shadow-commits
mailing list