diff --git a/testcases/cli-test/bird/oe_test_birdc_01.sh b/testcases/cli-test/bird/oe_test_birdc_01.sh index 6b40c2e485624b3c25455c8e3d29f1e302d3cabe..b05fc5a53a71769c4af1632116f2406c1e722801 100755 --- a/testcases/cli-test/bird/oe_test_birdc_01.sh +++ b/testcases/cli-test/bird/oe_test_birdc_01.sh @@ -43,7 +43,8 @@ EOF grep "bird> exit" tmp.txt CHECK_RESULT $? 0 0 "check birdc exit failed" rm -f tmp.txt - spawn birdc + expect < tmp.txt + spawn birdc expect "bird>" {send "help\n"} send "quit\n" expect eof @@ -65,7 +66,7 @@ EOF send "quit\n" expect eof EOF - num=$(wc -l tmp.txt) + num=$(cat tmp.txt|wc -l) if [[ $num == 4 ]]; then echo "aa" | grep "aa" else @@ -88,7 +89,7 @@ EOF send "quit\n" expect eof EOF - grep "ospf1: disabled" tmp.txt + grep "ospf1: already disabled" tmp.txt CHECK_RESULT $? 0 0 "check birdc disable failed" rm -f tmp.txt LOG_INFO "End to run test."