diff --git a/testcases/cli-test/elinks/oe_test_elinks_base_02.sh b/testcases/cli-test/elinks/oe_test_elinks_base_02.sh index 2747bc94f9a55c6b9549fa153f74aec8fd0b06bb..5362c29123ac401e5ce9b88dda7c9d0c5a9e1fb1 100644 --- a/testcases/cli-test/elinks/oe_test_elinks_base_02.sh +++ b/testcases/cli-test/elinks/oe_test_elinks_base_02.sh @@ -17,7 +17,7 @@ # @Desc : verify the uasge of elinks command # ############################################ -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}/libs/locallibs/common_lib.sh" function pre_test() { LOG_INFO "Start environmental preparation." @@ -29,7 +29,7 @@ function pre_test() { function run_test() { LOG_INFO "Start to run test." - elinks -dump text -dump-color-mode 1 www.baidu.com | grep "http://zhidao.baidu.com" + elinks -dump text -dump-color-mode 1 www.baidu.com | grep "https://zhidao.baidu.com" CHECK_RESULT $? 0 0 "Check elinks -dump -dump-color-mode failed" elinks -dump text -dump-width 1 www.baidu.com | grep "http://wenku.baidu.com" @@ -38,10 +38,10 @@ function run_test() { elinks -eval text www.baidu.com | grep "http://www.baidu.com/content-search" CHECK_RESULT $? 0 0 "Check elinks -eval failed" - elinks --help | fgrep "Usage: elinks [OPTION]" + elinks --help | grep -F "Usage: elinks [OPTION]" CHECK_RESULT $? 0 0 "Check elinks --help failed" - elinks -h | fgrep "Usage: elinks [OPTION]" + elinks -h | grep -F "Usage: elinks [OPTION]" CHECK_RESULT $? 0 0 "Check elinks -h failed" elinks -version | grep "ELinks [[:digit:]]" @@ -68,8 +68,8 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE - rm -rf *.log text + DNF_REMOVE "$@" + rm -rf -- *.log text LOG_INFO "Finish restore the test environment." } diff --git a/testcases/cli-test/elinks/oe_test_elinks_base_03.sh b/testcases/cli-test/elinks/oe_test_elinks_base_03.sh index 584d40433b35de171411cc056d998624583945e9..990e8b48007496092aa575391c76319d6dbc5f48 100644 --- a/testcases/cli-test/elinks/oe_test_elinks_base_03.sh +++ b/testcases/cli-test/elinks/oe_test_elinks_base_03.sh @@ -17,7 +17,7 @@ # @Desc : verify the uasge of elinks command # ############################################ -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}/libs/locallibs/common_lib.sh" function pre_test() { LOG_INFO "Start environmental preparation." @@ -46,7 +46,7 @@ function run_test() { nohup elinks -no-references www.baidu.com >./info3.log 2>&1 & SLEEP_WAIT 2 - fgrep "Refresh: [1]http://www.baidu.com/baidu.html" ./info3.log + grep -F "百度搜索" ./info3.log CHECK_RESULT $? 0 0 "Check elinks -no-references failed" elinks -remote text -dump www.baidu.com | grep "http://www.beian.gov.cn/portal" @@ -75,8 +75,8 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE - rm -rf *.log text + DNF_REMOVE "$@" + rm -rf -- *.log text LOG_INFO "Finish restore the test environment." }