From c6a58b791787370ed4bf72a7e5e3903df3dcfce0 Mon Sep 17 00:00:00 2001 From: dongQ Date: Thu, 9 May 2024 17:17:46 +0800 Subject: [PATCH] add case oe_test_zsh_001 --- suite2cases/zsh.json | 9 ++++ .../zsh/oe_test_zsh_001/oe_test_zsh_001.sh | 46 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 suite2cases/zsh.json create mode 100644 testcases/cli-test/zsh/oe_test_zsh_001/oe_test_zsh_001.sh diff --git a/suite2cases/zsh.json b/suite2cases/zsh.json new file mode 100644 index 000000000..7b133de1c --- /dev/null +++ b/suite2cases/zsh.json @@ -0,0 +1,9 @@ +{ + "path": "$OET_PATH/testcases/cli-test/zsh", + "cases": [ + { + "name": "oe_test_zsh_001" + } + ] +} + diff --git a/testcases/cli-test/zsh/oe_test_zsh_001/oe_test_zsh_001.sh b/testcases/cli-test/zsh/oe_test_zsh_001/oe_test_zsh_001.sh new file mode 100644 index 000000000..7ac3c50d5 --- /dev/null +++ b/testcases/cli-test/zsh/oe_test_zsh_001/oe_test_zsh_001.sh @@ -0,0 +1,46 @@ +#!/usr/bin/bash + +# Copyright (c) 2024. Huawei Technologies Co.,Ltd.ALL rights reserved. +# This program is licensed under Mulan PSL v2. +# You can use it according to the terms and conditions of the Mulan PSL v2. +# http://license.coscl.org.cn/MulanPSL2 +# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# See the Mulan PSL v2 for more detaitest -f. + +#################################### +#@Author : dongQ +#@Contact : dongqi1@kylinos.cn +#@Date : 2024-05-09 +#@License : Mulan PSL v2 +#@Version : 1.0 +#@Desc : Test zsh +##################################### + + +source "${OET_PATH}/libs/locallibs/common_lib.sh" + +function pre_test() { + LOG_INFO "Start to prepare the test environment." + + DNF_INSTALL zsh + + LOG_INFO "End of environmental preparation!" +} + +function run_test() { + LOG_INFO "Start to run test." + + zsh -c 'echo "Hello, Zsh!"' + CHECK_RESULT $? 0 0 "zsh test failed" + + LOG_INFO "End to run test." +} + +function post_test() { + LOG_INFO "Nothing to do." +} + +main "$@" + -- Gitee