aboutsummaryrefslogtreecommitdiff
path: root/testcases/commands
diff options
context:
space:
mode:
authorWanlong Gao <gaowanlong@cn.fujitsu.com>2013-04-03 11:02:59 +0800
committerWanlong Gao <gaowanlong@cn.fujitsu.com>2013-04-04 20:22:21 +0800
commit74500f984c2e2b926650367f6a55f3ee9b33c617 (patch)
tree1884788001d3da4e3e971ebe977e36af29fb54d7 /testcases/commands
parent03680e04310ea3cea4cab18c62fdf86b30127c40 (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-xtestcases/commands/su/su01_s12
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 }
}
}
}