@@ -97,7 +97,7 @@ test("LLVM 已生效时不重复安装或切换", () => {
9797 } ) ;
9898} ) ;
9999
100- test ( "没有 effective 工具链时不推断需要切换全局默认 " , ( ) => {
100+ test ( "没有 effective 工具链时安装 LLVM 后设置全局默认 " , ( ) => {
101101 const plan = buildModuleSetupPlan (
102102 inventory ( ) ,
103103 "unavailable" ,
@@ -108,7 +108,7 @@ test("没有 effective 工具链时不推断需要切换全局默认", () => {
108108 assert . deepEqual ( plan , {
109109 kind : "ready" ,
110110 installLlvm : true ,
111- switchDefault : false ,
111+ switchDefault : true ,
112112 } ) ;
113113} ) ;
114114
@@ -216,12 +216,12 @@ test("模块设置命令使用固定 argv 数组且始终构建", () => {
216216 [
217217 { stage : "install" , mode : "task" , args : [ "toolchain" , "install" , "llvm" ] } ,
218218 { stage : "default" , mode : "process" , args : [ "toolchain" , "default" , "llvm" ] } ,
219- { stage : "build" , mode : "task" , args : [ "build" ] } ,
219+ { stage : "build" , mode : "task" , args : [ "build" , "--no-cache" ] } ,
220220 ] ,
221221 ) ;
222222 assert . deepEqual (
223223 mcppModuleSetupCommands ( { kind : "ready" , installLlvm : false , switchDefault : false } ) ,
224- [ { stage : "build" , mode : "task" , args : [ "build" ] } ] ,
224+ [ { stage : "build" , mode : "task" , args : [ "build" , "--no-cache" ] } ] ,
225225 ) ;
226226} ) ;
227227
@@ -255,7 +255,13 @@ test("确认文案说明将复用已安装的 LLVM", () => {
255255} ) ;
256256
257257test ( "确认文案在无需切换时明确不修改全局默认值" , ( ) => {
258- const plan = ready ( buildModuleSetupPlan ( inventory ( ) , "unavailable" , true , false ) ) ;
258+ const llvm = toolchain ( "llvm" , true ) ;
259+ const plan = ready ( buildModuleSetupPlan (
260+ inventory ( { installed : [ llvm ] , effective : llvm } ) ,
261+ "full" ,
262+ true ,
263+ false ,
264+ ) ) ;
259265 const confirmation = moduleSetupConfirmation (
260266 "unavailable" ,
261267 plan ,
0 commit comments