diff options
author | Christian Perrier <bubulle@debian.org> | 2013-07-27 18:38:24 +0200 |
---|---|---|
committer | Christian Perrier <bubulle@debian.org> | 2013-07-27 18:38:24 +0200 |
commit | 5e7263d5769fdec5cdc9fd8a9e73611c14714edd (patch) | |
tree | 113e8de082a356ec4bf1b4f1fb1518a5155d9874 /tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp | |
parent | 03e6eeb8bb4697fa0e488fabcf507f907f244925 (diff) | |
download | shadow-debian.tar.gz |
Drop tests/ from the debian branchdebian
Diffstat (limited to 'tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp')
-rwxr-xr-x | tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp deleted file mode 100755 index 4a4053aa..00000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 |