diff options
author | Wanlong Gao <gaowanlong@cn.fujitsu.com> | 2013-04-03 11:02:59 +0800 |
---|---|---|
committer | Wanlong Gao <gaowanlong@cn.fujitsu.com> | 2013-04-04 20:22:21 +0800 |
commit | 74500f984c2e2b926650367f6a55f3ee9b33c617 (patch) | |
tree | 1884788001d3da4e3e971ebe977e36af29fb54d7 /testcases/commands | |
parent | 03680e04310ea3cea4cab18c62fdf86b30127c40 (diff) |
su01: fix the uncompleted string match
We find that sometimes "spawn /bin/su -l $USER1 -c whoami"
may return two lines:
"Attempting to create directory /home/su_usr2/perl5"
"su_usr2"
So the uncompleted "su_usr2" string match the first line,
but we expect to match the second line here.
So, fix it to match "su_usr2\r" instead.
Reported-by: DAN LI <li.dan@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Diffstat (limited to 'testcases/commands')
-rwxr-xr-x | testcases/commands/su/su01_s1 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testcases/commands/su/su01_s1 b/testcases/commands/su/su01_s1 index 4439bdea3..b50ebdf92 100755 --- a/testcases/commands/su/su01_s1 +++ b/testcases/commands/su/su01_s1 @@ -320,7 +320,7 @@ expect { "Password:" { send "$USER1_PASSWORD\r" expect { - "$USER1" { set i_am_correct 1 } + "$USER1\r" { set i_am_correct 1 } } } } |