|
|
@@ -745,6 +745,21 @@ verify_http() {
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+verify_http_contains() {
|
|
|
+ local label="$1"
|
|
|
+ local url="$2"
|
|
|
+ local pattern="$3"
|
|
|
+ local body code
|
|
|
+ body="$(curl -k -s -m 20 -w "\n%{http_code}" "${url}" || true)"
|
|
|
+ code="${body##*$'\n'}"
|
|
|
+ if [[ "${code}" =~ ^(200|301|302|304)$ && "${body}" == *"${pattern}"* ]]; then
|
|
|
+ ok "${label}(HTTP ${code})"
|
|
|
+ else
|
|
|
+ fail "${label}(HTTP ${code:-000},缺少内容:${pattern})"
|
|
|
+ VERIFY_FAILED=1
|
|
|
+ fi
|
|
|
+}
|
|
|
+
|
|
|
verify_remote_file_contains() {
|
|
|
local label="$1"
|
|
|
local rel_path="$2"
|
|
|
@@ -1565,6 +1580,9 @@ SELECT IF(
|
|
|
verify_http "教育学院-2026 首页可访问" "https://ffkj-education-2026.hxcs.feifan.net/"
|
|
|
verify_http "教育学院-2026 学院概况列表可访问" "https://ffkj-education-2026.hxcs.feifan.net/xueyuangaikuang/"
|
|
|
verify_http "教育学院-2026 学院简介单页可访问" "https://ffkj-education-2026.hxcs.feifan.net/xueyuangaikuang/xueyuanjianjie/"
|
|
|
+ verify_http_contains "教育学院-2026 学院简介显示真实复制文章" \
|
|
|
+ "https://ffkj-education-2026.hxcs.feifan.net/xueyuangaikuang/xueyuanjianjie/" \
|
|
|
+ "2026-04-03"
|
|
|
verify_http "教育学院-2026 新闻动态列表可访问" "https://ffkj-education-2026.hxcs.feifan.net/xinwentonggao/xinwendongtai/"
|
|
|
verify_http "教育学院-2026 新闻正文可访问" "https://ffkj-education-2026.hxcs.feifan.net/education/EDU000000011.htm"
|
|
|
verify_http "教育学院-2026 站内搜索可访问" "https://ffkj-education-2026.hxcs.feifan.net/search?str=%E6%95%99%E8%82%B2"
|