From 663470e3ff797b4aea1c7fc5a11944a71950d165 Mon Sep 17 00:00:00 2001 From: Jensfrank Date: Thu, 27 Jun 2024 11:24:17 +0800 Subject: [PATCH] Update nodeloc_vps_autotest_ip.sh --- nodeloc_vps_autotest_ip.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nodeloc_vps_autotest_ip.sh b/nodeloc_vps_autotest_ip.sh index 1c8a484..a22a811 100644 --- a/nodeloc_vps_autotest_ip.sh +++ b/nodeloc_vps_autotest_ip.sh @@ -146,7 +146,7 @@ run_all_tests() { # IP质量 echo -e "运行${YELLOW}IP质量测试...${NC}" - run_and_capture "bash <(curl -Ls IP.Check.Place)" + ip_quality_result=$(run_and_capture "bash <(curl -Ls IP.Check.Place)") # 格式化结果 echo -e "${YELLOW}此报告由Nodeloc_VPS_自动脚本测试生成...${NC}" @@ -155,16 +155,13 @@ run_all_tests() { # 格式化结果为 Markdown format_results() { - result="[tabs]\n" - - # IP质量测试结果 - result+="[tab=\"IP质量\"]\n\`\`\`\n${test_results[0]}\n\`\`\`\n[/tab]\n" - - # 添加其他测试结果 - # 例如: - # result+="[tab=\"Yabs\"]\n\`\`\`\n${test_results[1]}\n\`\`\`\n[/tab]\n" - - result+="[/tabs]" +result="[tabs] +[tab=\"IP质量\"] +\`\`\` +$ip_quality_result +\`\`\` +[/tab] +[/tabs]" echo "$result" > results.md echo -e "${GREEN}结果已保存到 results.md 文件中。${NC}"