From: DAN LI <li...@cn...> - 2013-05-29 06:09:16
|
Expect code * spawn su -c "/bin/su root -c \"echo \"\\\$TEST_LINE > $TEST_ENV_FILE\"\"" will be translated to * spawn su -c /bin/su root -c "echo "\$TEST_LINE > /tmp/TEST_ENV_FILE_ROOT"" which actually should be * spawn su -c /bin/su root -c "echo \$TEST_LINE > /tmp/TEST_ENV_FILE_ROOT" Signed-off-by: DAN LI <li...@cn...> --- testcases/commands/su/su01_s1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/commands/su/su01_s1 b/testcases/commands/su/su01_s1 index b50ebdf..fd2e485 100755 --- a/testcases/commands/su/su01_s1 +++ b/testcases/commands/su/su01_s1 @@ -145,7 +145,7 @@ set exit_code [lindex $codes 3] set i_have_env 0 set test_env_var " " if { $i_am_root==1 } { - spawn su -c "/bin/su root -c \"echo \"\\\$TEST_LINE > $TEST_ENV_FILE\"\"" + spawn su -c "/bin/su root -c \"echo \\\$TEST_LINE > $TEST_ENV_FILE\"" expect { "Password:" { send "$PASSWD\r" -- 1.8.1 |