wx-compiler/test/spec/issue/129/issue129.spec.ts
msojocs f31c7dbe8f
fix: wcsc 索引与 一个括号 (#12)
* fix: wine environment

* fix: wine environment

* fix: environment

* perf: remove recommend

* fix: env

* Update release.yml

* fix: permission of wcsc.exe

* fix: 一处越界问题

* fix: pnpm install

* fix: wine prepare

* fix: wine cfg

* feat: error console

* fix: 兼容clang

* perf: 调整位置

* perf: 带入环境

* fix: version

* perf: log

* fix: version check

* fix: version

* fix: wcsc 索引与 一个括号
处理一处索引出现负数的问题;
一处css输出了多余的括号。

* fix: ci
2025-02-16 22:43:43 +08:00

39 lines
1.3 KiB
TypeScript

import assert from "assert"
import path from "path"
import { describe } from "mocha";
import linux from '../../../runner/module-linux'
import windows from '../../../runner/module-windows'
import * as fs from 'fs'
describe("issue - 129", function () {
describe("issue: linux output should equal with wine", function () {
it("crash", async function () {
const p = path.resolve(__dirname, './data/example.json')
const storagePath = path.resolve(
__dirname,
`issue-129/${this.test?.title}`
);
try {
fs.mkdirSync(storagePath, { recursive: true });
} catch (error) {}
const w = await windows.wcsc(p);
const n = await linux.wcsc(p, '', storagePath);
// console.log('windows:', typeof w)
// console.log('linux:', typeof n)
fs.writeFileSync(
`${storagePath}/wine-output.json`,
JSON.stringify(w, null, 4)
);
fs.writeFileSync(
`${storagePath}/node-output.json`,
JSON.stringify(n, null, 4)
);
assert.equal(typeof n, typeof w);
assert.equal(w.success, true)
assert.deepEqual(n, w);
});
});
});