update testcase for testsuite texlive-soul-doc
This commit is contained in:
@@ -17,10 +17,6 @@
|
||||
{
|
||||
"name": "test_texlive-soul-doc_function_doc_files",
|
||||
"desc": "Verify core documentation files are present after installation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-soul-doc_function_doc_access",
|
||||
"desc": "Verify documentation can be accessed via texdoc command"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Copyright (c) 2024 ISCAS .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 details.
|
||||
|
||||
# #############################################
|
||||
# @Author : honghua
|
||||
# @Contact : honghua@iscas.ac.cn
|
||||
# @Date : 2026-02-27
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Verify documentation can be accessed via texdoc command
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:验证可以通过texdoc命令访问文档"
|
||||
LOG_INFO "步骤1:检查yum源中是否存在texlive-soul-doc软件包"
|
||||
dnf list available texlive-soul-doc > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texlive-soul-doc软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查texlive-soul-doc是否已安装"
|
||||
dnf list installed texlive-soul-doc > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texlive-soul-doc已安装,测试后将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "texlive-soul-doc未安装,将进行安装作为测试步骤"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装texlive-soul-doc软件包"
|
||||
dnf install -y texlive-soul-doc
|
||||
CHECK_RESULT $? 0 0 "安装texlive-soul-doc失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:检查texdoc命令是否可用"
|
||||
texdoc --help > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "texdoc命令不存在或不支持"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤5:使用texdoc命令访问texlive-soul-doc文档"
|
||||
texdoc soul > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "无法通过texdoc命令访问soul文档"
|
||||
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤6:卸载texlive-soul-doc软件包"
|
||||
dnf remove -y texlive-soul-doc
|
||||
CHECK_RESULT $? 0 0 "卸载texlive-soul-doc失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:验证可以通过texdoc命令访问文档"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user