54d0fb75ea
新增 GDExtension 自动引导、GDScript 执行和实例隔离缓存 接入 AGC 插件开关、Runner、Agent 工具与权限审计 完善执行回执确认、不确定状态阻断及卸载恢复 补齐 Windows 分发资源、定向测试与实机验收文档
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { test } from 'node:test';
|
|
|
|
import { buildTauriBuildArguments } from './build-release.mjs';
|
|
import { withDefaultCargoFeatures } from './cargo-features.mjs';
|
|
|
|
test('Windows release includes the same editor feature as development', () => {
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments([], 'x86_64-pc-windows-msvc', 'win32'),
|
|
[
|
|
'build',
|
|
'--features=cocos-editor-execute,unity-editor-execute,godot-editor-execute',
|
|
'--target',
|
|
'x86_64-pc-windows-msvc',
|
|
],
|
|
);
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments(
|
|
['--no-bundle'],
|
|
'x86_64-pc-windows-msvc',
|
|
'linux',
|
|
),
|
|
['build', '--no-bundle'],
|
|
);
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments(['--target=aarch64-apple-darwin']),
|
|
['build', '--target=aarch64-apple-darwin'],
|
|
);
|
|
});
|
|
test('explicit Cargo features override defaults in every supported spelling', () => {
|
|
for (const args of [
|
|
['--features', 'custom'],
|
|
['--features=custom'],
|
|
['-f', 'custom'],
|
|
['-fcustom'],
|
|
]) {
|
|
assert.deepEqual(
|
|
withDefaultCargoFeatures(args, ['cocos-editor-execute']),
|
|
args,
|
|
);
|
|
}
|
|
assert.deepEqual(
|
|
withDefaultCargoFeatures(
|
|
['--', '--features=app'],
|
|
['cocos-editor-execute'],
|
|
),
|
|
['--features=cocos-editor-execute', '--', '--features=app'],
|
|
);
|
|
});
|