Merge pull request '复核 #7、#8:修正目录详情判定和失效的回归测试' (#9) from ChatGPT/laysense.cn:audit-directory-links into main
This commit was merged in pull request #9.
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Content;
|
||||||
|
|
||||||
|
use DOMDocument;
|
||||||
|
use DOMXPath;
|
||||||
|
|
||||||
|
final class DirectoryCard
|
||||||
|
{
|
||||||
|
public static function links(array $article, string $body): array
|
||||||
|
{
|
||||||
|
$detail = self::hasText($article['summary']) || self::hasBody($body) ? '/articles/' . $article['slug'] : '';
|
||||||
|
$primary = ($article['card']['url'] ?? '') ?: $detail;
|
||||||
|
|
||||||
|
return ['primary' => $primary, 'detail' => $primary === $detail ? '' : $detail];
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function hasText(string $text): bool
|
||||||
|
{
|
||||||
|
return preg_match('/[^\s\p{Z}\p{Cf}]/u', $text) === 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function hasBody(string $html): bool
|
||||||
|
{
|
||||||
|
if (self::hasText(html_entity_decode(strip_tags($html), ENT_QUOTES | ENT_HTML5, 'UTF-8'))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!str_contains($html, 'src=')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$document = new DOMDocument();
|
||||||
|
$document->loadHTML('<meta charset="utf-8">' . $html, LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET);
|
||||||
|
$xpath = new DOMXPath($document);
|
||||||
|
|
||||||
|
return (bool) $xpath->evaluate('boolean(//img[@src] | //audio[@src] | //video[@src] | //audio/source[@src] | //video/source[@src])');
|
||||||
|
}
|
||||||
|
}
|
||||||
+42
-43
@@ -1,43 +1,42 @@
|
|||||||
<?php
|
<?php
|
||||||
use App\Content\View;
|
use App\Content\DirectoryCard;
|
||||||
|
use App\Content\Html;
|
||||||
$e = View::escape(...);
|
use App\Content\View;
|
||||||
?>
|
|
||||||
<section class="section network" aria-label="支持项目与合作伙伴">
|
$e = View::escape(...);
|
||||||
<div class="wrap">
|
?>
|
||||||
<?php if (!$standalone): ?>
|
<section class="section network" aria-label="支持项目与合作伙伴">
|
||||||
<div class="section-heading inline-heading">
|
<div class="wrap">
|
||||||
<h2>支持项目与合作伙伴</h2>
|
<?php if (!$standalone): ?>
|
||||||
<a class="button button-outline" href="/network">查看全部</a>
|
<div class="section-heading inline-heading">
|
||||||
</div>
|
<h2>支持项目与合作伙伴</h2>
|
||||||
<?php endif ?>
|
<a class="button button-outline" href="/network">查看全部</a>
|
||||||
<?php foreach ($network as $slug => $group): ?>
|
</div>
|
||||||
<div class="network-group" id="<?= $e($slug) ?>">
|
<?php endif ?>
|
||||||
<?php if ($standalone): ?><h2><?= $e($group['name']) ?></h2><?php else: ?><h3><?= $e($group['name']) ?></h3><?php endif ?>
|
<?php foreach ($network as $slug => $group): ?>
|
||||||
<?php if (!$group['articles']): ?><p class="empty-state">暂无已发布条目。</p><?php endif ?>
|
<div class="network-group" id="<?= $e($slug) ?>">
|
||||||
<ul class="network-list">
|
<?php if ($standalone): ?><h2><?= $e($group['name']) ?></h2><?php else: ?><h3><?= $e($group['name']) ?></h3><?php endif ?>
|
||||||
<?php foreach ($group['articles'] as $item): ?>
|
<?php if (!$group['articles']): ?><p class="empty-state">暂无已发布条目。</p><?php endif ?>
|
||||||
<?php
|
<ul class="network-list">
|
||||||
// 优先跳卡片配置的网址;没有网址时,只有文章本身有内容才回退到文章页,否则不渲染链接。
|
<?php foreach ($group['articles'] as $item): ?>
|
||||||
$card = $item['card'];
|
<?php
|
||||||
$articlePath = '/articles/' . $item['slug'];
|
$card = $item['card'];
|
||||||
$hasDetail = $item['body'] !== '' || $item['summary'] !== '';
|
['primary' => $target, 'detail' => $detail] = DirectoryCard::links($item, Html::articleBody($item));
|
||||||
$target = ($card['url'] ?? '') ?: ($hasDetail ? $articlePath : '');
|
?>
|
||||||
?>
|
<li>
|
||||||
<li>
|
<?php if ($target !== ''): ?><a href="<?= $e($target) ?>"><?php else: ?><span class="network-static"><?php endif ?>
|
||||||
<?php if ($target !== ''): ?><a href="<?= $e($target) ?>"><?php else: ?><span class="network-static"><?php endif ?>
|
<?php if (!empty($card['image'])): ?>
|
||||||
<?php if (!empty($card['image'])): ?>
|
<img src="<?= $e($card['image']) ?>" alt="" loading="lazy" width="76" height="28">
|
||||||
<img src="<?= $e($card['image']) ?>" alt="" loading="lazy" width="76" height="28">
|
<?php endif ?>
|
||||||
<?php endif ?>
|
<span><?= $e($item['title']) ?></span>
|
||||||
<span><?= $e($item['title']) ?></span>
|
<?php if ($target !== ''): ?></a><?php else: ?></span><?php endif ?>
|
||||||
<?php if ($target !== ''): ?></a><?php else: ?></span><?php endif ?>
|
<?php if ($standalone && $detail !== ''): ?>
|
||||||
<?php if ($standalone && !empty($card['url']) && $hasDetail): ?>
|
<a class="network-detail" href="<?= $e($detail) ?>">查看详情</a>
|
||||||
<a class="network-detail" href="<?= $e($articlePath) ?>">查看详情</a>
|
<?php endif ?>
|
||||||
<?php endif ?>
|
</li>
|
||||||
</li>
|
<?php endforeach ?>
|
||||||
<?php endforeach ?>
|
</ul>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
<?php endforeach ?>
|
||||||
<?php endforeach ?>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
|
|||||||
+50
-48
@@ -1,48 +1,50 @@
|
|||||||
<?php
|
<?php
|
||||||
use App\Content\Html;
|
use App\Content\DirectoryCard;
|
||||||
use App\Content\View;
|
use App\Content\Html;
|
||||||
|
use App\Content\View;
|
||||||
$e = View::escape(...);
|
|
||||||
?>
|
$e = View::escape(...);
|
||||||
<section class="section catalog-hero">
|
?>
|
||||||
<div class="wrap">
|
<section class="section catalog-hero">
|
||||||
<nav class="breadcrumbs" aria-label="面包屑"><a href="/">首页</a><span aria-hidden="true">/</span><span aria-current="page">产品与服务</span></nav>
|
<div class="wrap">
|
||||||
<h1>产品与服务</h1>
|
<nav class="breadcrumbs" aria-label="面包屑"><a href="/">首页</a><span aria-hidden="true">/</span><span aria-current="page">产品与服务</span></nav>
|
||||||
<p>自托管建站、开源智能 DNS 与软件著作权代理服务。</p>
|
<h1>产品与服务</h1>
|
||||||
</div>
|
<p>自托管建站、开源智能 DNS 与软件著作权代理服务。</p>
|
||||||
</section>
|
</div>
|
||||||
<section class="section catalog-listing" aria-label="产品与服务目录">
|
</section>
|
||||||
<div class="wrap">
|
<section class="section catalog-listing" aria-label="产品与服务目录">
|
||||||
<?php if (!$products): ?><p class="empty-state">暂无可查看的产品和服务。</p><?php endif ?>
|
<div class="wrap">
|
||||||
<div class="catalog-grid">
|
<?php if (!$products): ?><p class="empty-state">暂无可查看的产品和服务。</p><?php endif ?>
|
||||||
<?php foreach ($products as $product): ?>
|
<div class="catalog-grid">
|
||||||
<?php
|
<?php foreach ($products as $product): ?>
|
||||||
// 目录卡片指向卡片自己配置的网址;没有网址时,只有文章本身有内容才回退到文章页。
|
<?php
|
||||||
$card = $product['card'];
|
$card = $product['card'];
|
||||||
$hasDetail = $product['body'] !== '' || $product['summary'] !== '';
|
$body = Html::articleBody($product);
|
||||||
$target = ($card['url'] ?? '') ?: ($hasDetail ? '/articles/' . $product['slug'] : '');
|
['primary' => $target, 'detail' => $detail] = DirectoryCard::links($product, $body);
|
||||||
?>
|
$extra = $card['extra_url'] ?? '';
|
||||||
<article class="catalog-card">
|
?>
|
||||||
<?php if (!empty($card['image'])): ?>
|
<article class="catalog-card">
|
||||||
<div class="catalog-image"><img src="<?= $e($card['image']) ?>" alt="<?= $e($card['alt'] ?? '') ?>" loading="lazy"></div>
|
<?php if (!empty($card['image'])): ?>
|
||||||
<?php endif ?>
|
<div class="catalog-image"><img src="<?= $e($card['image']) ?>" alt="<?= $e($card['alt'] ?? '') ?>" loading="lazy"></div>
|
||||||
<div class="catalog-content">
|
<?php endif ?>
|
||||||
<?php if (!empty($card['category_label'])): ?><p class="overline"><?= $e($card['category_label']) ?></p><?php endif ?>
|
<div class="catalog-content">
|
||||||
<h2><?php if ($target !== ''): ?><a href="<?= $e($target) ?>"><?= $e($product['title']) ?></a><?php else: ?><?= $e($product['title']) ?><?php endif ?></h2>
|
<?php if (!empty($card['category_label'])): ?><p class="overline"><?= $e($card['category_label']) ?></p><?php endif ?>
|
||||||
<?php if ($product['summary']): ?>
|
<h2><?php if ($target !== ''): ?><a href="<?= $e($target) ?>"><?= $e($product['title']) ?></a><?php else: ?><?= $e($product['title']) ?><?php endif ?></h2>
|
||||||
<p><?= $e($product['summary']) ?></p>
|
<?php if ($product['summary']): ?>
|
||||||
<?php else: ?>
|
<p><?= $e($product['summary']) ?></p>
|
||||||
<div class="rich"><?= Html::articleBody($product) ?></div>
|
<?php else: ?>
|
||||||
<?php endif ?>
|
<div class="rich"><?= $body ?></div>
|
||||||
<?php if ($target !== '' || !empty($card['extra_url'])): ?>
|
<?php endif ?>
|
||||||
<div class="actions">
|
<?php if ($target !== '' || $extra !== ''): ?>
|
||||||
<?php if ($target !== ''): ?><a class="button button-primary" href="<?= $e($target) ?>"><?= $e(($card['label'] ?? '') ?: '了解详情') ?></a><?php endif ?>
|
<div class="actions">
|
||||||
<?php if (!empty($card['extra_url'])): ?><a href="<?= $e($card['extra_url']) ?>"><?= $e(($card['extra_label'] ?? '') ?: '相关链接') ?></a><?php endif ?>
|
<?php if ($target !== ''): ?><a class="button button-primary" href="<?= $e($target) ?>"><?= $e(($card['label'] ?? '') ?: '了解详情') ?></a><?php endif ?>
|
||||||
</div>
|
<?php if ($extra !== '' && $extra !== $target): ?><a href="<?= $e($extra) ?>"><?= $e(($card['extra_label'] ?? '') ?: '相关链接') ?></a><?php endif ?>
|
||||||
<?php endif ?>
|
<?php if ($detail !== '' && $detail !== $extra): ?><a class="catalog-detail" href="<?= $e($detail) ?>">查看详情</a><?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
<?php endif ?>
|
||||||
<?php endforeach ?>
|
</div>
|
||||||
</div>
|
</article>
|
||||||
</div>
|
<?php endforeach ?>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|||||||
@@ -282,7 +282,9 @@ progress { width: 100%; height: .8rem; accent-color: var(--accent); }
|
|||||||
.network-group + .network-group { margin-top: 2.2rem; }
|
.network-group + .network-group { margin-top: 2.2rem; }
|
||||||
.network-group h3 { margin-bottom: .8rem; }
|
.network-group h3 { margin-bottom: .8rem; }
|
||||||
.network-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .7rem; }
|
.network-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .7rem; }
|
||||||
.network-list li > * { display: flex; align-items: center; gap: .75rem; min-height: 4rem; height: 100%; border-radius: .65rem; background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; padding: .75rem; transition: transform 160ms ease, border-color 160ms ease; }
|
.network-list li { display: flex; flex-direction: column; gap: .35rem; }
|
||||||
|
.network-list li > * { display: flex; align-items: center; gap: .75rem; min-height: 4rem; border-radius: .65rem; background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; padding: .75rem; transition: transform 160ms ease, border-color 160ms ease; }
|
||||||
|
.network-list li > :first-child { flex: 1; }
|
||||||
.network-list a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
|
.network-list a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
|
||||||
.network-list img { max-width: 3rem; max-height: 1.8rem; object-fit: contain; object-position: left; }
|
.network-list img { max-width: 3rem; max-height: 1.8rem; object-fit: contain; object-position: left; }
|
||||||
.network-list img[src$="oneprovider_invert.svg"] { background: #29354a; border-radius: .25rem; padding: .21rem; }
|
.network-list img[src$="oneprovider_invert.svg"] { background: #29354a; border-radius: .25rem; padding: .21rem; }
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
|
||||||
|
|
||||||
use App\Content\Database;
|
|
||||||
|
|
||||||
// 输出目录类文章:slug<TAB>卡片网址<TAB>是否已发布
|
|
||||||
$pdo = Database::connect();
|
|
||||||
$query = $pdo->query("SELECT a.slug, a.card, a.status FROM articles a
|
|
||||||
WHERE EXISTS (SELECT 1 FROM article_category_links l WHERE l.article_id = a.id
|
|
||||||
AND l.category_slug IN ('services', 'supported-projects', 'partners'))
|
|
||||||
ORDER BY a.id");
|
|
||||||
foreach ($query as $row) {
|
|
||||||
$card = json_decode($row['card'], true) ?: [];
|
|
||||||
echo $row['slug'], '|', $card['url'] ?? '', '|', $row['status'], "\n";
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
|
|
||||||
|
use App\Content\View;
|
||||||
|
|
||||||
|
$primary = 'https://example.com/product?a=1&b=2';
|
||||||
|
$cases = [
|
||||||
|
'configured-with-detail' => [['card' => ['url' => $primary], 'body' => '<p>有正文</p>'], $primary, true],
|
||||||
|
'configured-only' => [['card' => ['url' => '/pagepan']], '/pagepan', false],
|
||||||
|
'summary-only' => [['summary' => '仅摘要'], '/articles/summary-only', false],
|
||||||
|
'editor-placeholder' => [['body' => '<p><br></p><p> ​</p>'], '', false],
|
||||||
|
'markdown-comment' => [['body' => '<!-- 草稿注释 -->', 'body_format' => 'markdown'], '', false],
|
||||||
|
'media-body' => [['body' => '<video controls><source src="/assets/demo.mp4"></video>'], '/articles/media-body', false],
|
||||||
|
'unconfigured' => [[], '', false],
|
||||||
|
];
|
||||||
|
$items = [];
|
||||||
|
foreach ($cases as $slug => [$fields]) {
|
||||||
|
$items[] = $fields + ['slug' => $slug, 'title' => $slug, 'card' => [], 'summary' => '', 'body' => '', 'body_format' => 'html'];
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseFragment(string $html): DOMXPath
|
||||||
|
{
|
||||||
|
$document = new DOMDocument();
|
||||||
|
$document->loadHTML('<meta charset="utf-8">' . $html, LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET);
|
||||||
|
|
||||||
|
return new DOMXPath($document);
|
||||||
|
}
|
||||||
|
|
||||||
|
function equal(mixed $actual, mixed $expected, string $message): void
|
||||||
|
{
|
||||||
|
if ($actual !== $expected) {
|
||||||
|
throw new RuntimeException($message . ' ' . json_encode([$expected, $actual], JSON_UNESCAPED_UNICODE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$services = parseFragment(View::fragment('services', ['products' => $items]));
|
||||||
|
$network = parseFragment(View::fragment('network-groups', [
|
||||||
|
'network' => ['partners' => ['name' => '合作伙伴', 'articles' => $items]], 'standalone' => true,
|
||||||
|
]));
|
||||||
|
foreach ($cases as $slug => [, $target, $detail]) {
|
||||||
|
$card = "//article[h2='$slug' or div/h2='$slug']";
|
||||||
|
equal($services->evaluate("count($card)"), 1.0, "$slug 服务卡片存在");
|
||||||
|
equal($services->evaluate("string($card/div/h2/a/@href)"), $target, "$slug 服务标题目标");
|
||||||
|
equal($services->evaluate("string($card/div/div/a[contains(@class, 'button-primary')]/@href)"), $target, "$slug 服务按钮目标");
|
||||||
|
equal($services->evaluate("boolean($card/div/div/a[@class='catalog-detail'][@href='/articles/$slug'])"), $detail, "$slug 服务独立详情");
|
||||||
|
|
||||||
|
$item = "//li[*[1]/span='$slug']";
|
||||||
|
equal($network->evaluate("count($item)"), 1.0, "$slug 伙伴卡片存在");
|
||||||
|
equal($network->evaluate("string($item/*[1]/@href)"), $target, "$slug 伙伴卡片目标");
|
||||||
|
equal($network->evaluate("boolean($item/a[@class='network-detail'][@href='/articles/$slug'])"), $detail, "$slug 伙伴独立详情");
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("通过 %d 组目录卡片测试。\n", count($cases));
|
||||||
@@ -1,67 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# 目录页(/services、/network)的卡片链接必须指向卡片配置的网址,而不是 /articles/<slug>
|
set -euo pipefail
|
||||||
set -u
|
cd "$(dirname "$0")/.."
|
||||||
cd "$(dirname "$0")/.." || exit 1
|
exec "${PHP_BIN:-php}" tests/directory-links.php
|
||||||
BASE=http://127.0.0.1:8787
|
|
||||||
PASS=0; FAIL=0
|
|
||||||
ok(){ PASS=$((PASS+1)); printf ' ok %s\n' "$1"; }
|
|
||||||
no(){ FAIL=$((FAIL+1)); printf ' FAIL %s -> %s\n' "$1" "${2:-}"; }
|
|
||||||
|
|
||||||
SERVICES=$(curl -s "$BASE/services")
|
|
||||||
NETWORK=$(curl -s "$BASE/network")
|
|
||||||
ROWS=$(php tests/dircheck.php)
|
|
||||||
|
|
||||||
echo "== /services 卡片链接 =="
|
|
||||||
while IFS='|' read -r slug url status; do
|
|
||||||
[ -z "$slug" ] && continue
|
|
||||||
[ -z "$url" ] && continue
|
|
||||||
if echo "$SERVICES" | grep -q "href=\"$url\""; then ok "$slug 标题/按钮指向 $url"; else no "$slug 未指向 $url"; fi
|
|
||||||
if echo "$SERVICES" | grep -q "href=\"/articles/$slug\""; then no "$slug 仍出现 /articles/$slug"; else ok "$slug 不再指向文章页"; fi
|
|
||||||
done <<< "$(echo "$ROWS" | grep -E '^service-')"
|
|
||||||
|
|
||||||
echo "== /network 卡片链接 =="
|
|
||||||
while IFS='|' read -r slug url status; do
|
|
||||||
[ -z "$slug" ] && continue
|
|
||||||
[ -z "$url" ] && continue
|
|
||||||
if echo "$NETWORK" | grep -q "href=\"$url\""; then ok "$slug 指向 $url"; else no "$slug 未指向 $url"; fi
|
|
||||||
if echo "$NETWORK" | grep -q "href=\"/articles/$slug\""; then no "$slug 仍出现 /articles/$slug"; else ok "$slug 不再指向文章页"; fi
|
|
||||||
done <<< "$(echo "$ROWS" | grep -E '^network-')"
|
|
||||||
|
|
||||||
echo "== 标题链接与按钮链接一致性 =="
|
|
||||||
python3 - "$BASE" <<'PY'
|
|
||||||
import re, sys, html, urllib.request
|
|
||||||
base = sys.argv[1]
|
|
||||||
def get(path):
|
|
||||||
return urllib.request.urlopen(base + path, timeout=10).read().decode()
|
|
||||||
page = get('/services')
|
|
||||||
cards = re.findall(r'<article class="catalog-card">.*?</article>', page, re.S)
|
|
||||||
bad = 0
|
|
||||||
for card in cards:
|
|
||||||
links = re.findall(r'<a[^>]*href="([^"]+)"', card)
|
|
||||||
title = re.search(r'<h2><a href="([^"]+)"', card)
|
|
||||||
if not title:
|
|
||||||
print(' FAIL 卡片缺标题链接'); bad += 1; continue
|
|
||||||
primary = [l for l in links if not l.startswith('/articles/')]
|
|
||||||
if primary and title.group(1) != primary[0]:
|
|
||||||
print(' FAIL 标题 href=%s 与主按钮 href=%s 不一致' % (title.group(1), primary[0])); bad += 1
|
|
||||||
print(' ok %d 张卡片标题与主按钮一致' % (len(cards) - bad) if bad == 0 else ' 共 %d 张卡片,%d 张不一致' % (len(cards), bad))
|
|
||||||
sys.exit(0 if bad == 0 else 1)
|
|
||||||
PY
|
|
||||||
[ $? -eq 0 ] && ok "标题与按钮目标一致" || no "标题与主按钮目标不一致"
|
|
||||||
|
|
||||||
echo "== 参考信息:目录条目在文章流中的可见性(不判定) =="
|
|
||||||
PUB=$(echo "$ROWS" | awk -F'|' '$3 == "published" {print $1}')
|
|
||||||
N=0
|
|
||||||
for slug in $PUB; do
|
|
||||||
if curl -s "$BASE/articles" | grep -q "href=\"/articles/$slug\""; then N=$((N+1)); fi
|
|
||||||
done
|
|
||||||
echo " /articles 列表中出现的目录条目: $N / $(echo "$PUB" | wc -l)"
|
|
||||||
M=0
|
|
||||||
for slug in $PUB; do
|
|
||||||
if curl -s "$BASE/sitemap.xml" | grep -q "/articles/$slug"; then M=$((M+1)); fi
|
|
||||||
done
|
|
||||||
echo " sitemap 中的目录条目: $M / $(echo "$PUB" | wc -l)"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "== 结果: $PASS 通过, $FAIL 失败 =="
|
|
||||||
[ $FAIL -eq 0 ] || exit 1
|
|
||||||
|
|||||||
Reference in New Issue
Block a user