From 2a34e451a0813594ec211c564959d8181fed4bdd Mon Sep 17 00:00:00 2001 From: shafeipaozi Date: Tue, 31 Dec 2024 01:58:05 +0800 Subject: [PATCH] fix elinks --- testcases/cli-test/elinks/oe_test_elinks_base_02.sh | 12 ++++++------ testcases/cli-test/elinks/oe_test_elinks_base_03.sh | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) 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 2747bc94f..5362c2912 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 584d40433..990e8b480 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." } -- Gitee