mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-11-10 10:05:18 +00:00
Update nodeloc_vps_autotest_response.sh
This commit is contained in:
parent
1cf9a936a1
commit
179d629733
@ -108,6 +108,12 @@ show_welcome() {
|
||||
# 定义一个数组来存储每个命令的输出
|
||||
declare -a test_results
|
||||
|
||||
# 去除响应板块ANSI转义码
|
||||
response_process_output() {
|
||||
local input="$1"
|
||||
echo "$input" | sed 's/\x1b\[[0-9;]*m//g'
|
||||
}
|
||||
|
||||
# 在每个命令执行后保存结果
|
||||
run_and_capture() {
|
||||
local command_output
|
||||
@ -131,10 +137,13 @@ run_all_tests() {
|
||||
|
||||
# 格式化结果为 Markdown
|
||||
format_results() {
|
||||
# 处理响应测试结果
|
||||
local processed_response_result
|
||||
processed_response_result=$(response_process_output "$response_result")
|
||||
result="[tabs]
|
||||
[tab=\"响应\"]
|
||||
\`\`\`
|
||||
$response_result
|
||||
$processed_response_result
|
||||
\`\`\`
|
||||
[/tab]
|
||||
[/tabs]"
|
||||
|
Loading…
Reference in New Issue
Block a user