mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-12-27 08:45:20 +00:00
Update nodeloc_vps_autotest_yabs.sh
This commit is contained in:
parent
5b7a9e2e7a
commit
1680e7b053
@ -102,12 +102,17 @@ declare -a test_results
|
||||
|
||||
# 在每个命令执行后保存结果
|
||||
run_and_capture() {
|
||||
local command_output
|
||||
command_output=$(eval "$1" 2>&1)
|
||||
local command_output=$(eval "$1" 2>&1)
|
||||
test_results+=("$command_output")
|
||||
echo "$command_output"
|
||||
}
|
||||
|
||||
# 去除Yabs板块ANSI转义码
|
||||
yabs_process_output() {
|
||||
local input="$1"
|
||||
echo "$input" | sed -E 's/\x1b\[[0-9;]*[a-zA-Z]//g'
|
||||
}
|
||||
|
||||
# 运行所有测试
|
||||
run_all_tests() {
|
||||
echo -e "${RED}开始测试,测试时间较长,请耐心等待...${NC}"
|
||||
@ -123,10 +128,14 @@ run_all_tests() {
|
||||
|
||||
# 格式化结果为 Markdown
|
||||
format_results() {
|
||||
|
||||
# 处理yabs测试结果
|
||||
local processed_yabs_result=$(response_yabs_output "$yabs_result")
|
||||
|
||||
result="[tabs]
|
||||
[tab=\"YABS\"]
|
||||
\`\`\`
|
||||
$yabs_result
|
||||
$processed_yabs_result
|
||||
\`\`\`
|
||||
[/tab]
|
||||
[/tabs]"
|
||||
|
Loading…
Reference in New Issue
Block a user