Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(test): 统一文字档位守卫的逻辑路径分隔符

Kirozeng3689ddb91ad0
diff --git a/apps/desktop/src/renderer/__tests__/textTierDiscipline.test.ts b/apps/desktop/src/renderer/__tests__/textTierDiscipline.test.ts
index f2ff49d5d4..4436ffeaad 100644
--- a/apps/desktop/src/renderer/__tests__/textTierDiscipline.test.ts
+++ b/apps/desktop/src/renderer/__tests__/textTierDiscipline.test.ts
@@ -11,7 +11,7 @@
* 就算中性文字档,不维护手写名单。
*/
import { readdirSync, readFileSync, statSync } from 'node:fs';
-import { join, relative, resolve } from 'node:path';
+import { join, relative, resolve, sep } from 'node:path';
import { describe, expect, it } from 'vitest';
@@ -80,7 +80,8 @@ interface ClassLiteral {
function classLiterals(): ClassLiteral[] {
const out: ClassLiteral[] = [];
for (const file of sourceFiles(RENDERER)) {
- const rel = relative(RENDERER, file);
+ // 豁免表和诊断使用 `/` 分隔的仓库逻辑路径;实际文件读取仍保留宿主路径。
+ const rel = relative(RENDERER, file).split(sep).join('/');
readFileSync(file, 'utf8')
.split('\n')
.forEach((text, index) => {