fix(visual): 判据仪器 selftest 调用点被全局替换误改,闸自己崩溃
加元素级豁免时把主循环的调用点改成了两参数,同一次全局替换也命中了 selftest 循环里的调用, 而那里没有 rel 变量 ⇒ ReferenceError,--selftest 以非零码退出。这是「闸自身崩溃与判红共用 EXIT=1」那一族:崩溃看起来像判红,而这次连红都是假的。selftest 改传样本名,恢复四样本 两绿两红、EXIT=0(合成样本名不含 header-navigation,不会被元素级正则命中)。
This commit is contained in:
1 parent
c7293e24d2
commit
da9a5cb650
1 file changed
+1
-1
@@ -196,7 +196,7 @@ async function selftest() {
|
||||
['合成·正文真改不平移', await pair(B, await toPng(bodyNoShift, W, H)), false]];
|
||||
let ok = true;
|
||||
for (const [name, p, expect] of cases) {
|
||||
const v = verdict(p, rel);
|
||||
const v = verdict(p, name); // 自测用样本名当 rel:元素级豁免的正则不该在自测样本里命中
|
||||
const good = v.ok === expect;
|
||||
ok = ok && good;
|
||||
console.log(`${good ? '✓' : '✗'} ${name}:判为${v.ok ? '绿' : '红'}(期望${expect ? '绿' : '红'})${v.tag}`);
|
||||
|
||||
Reference in new issue
Block a user