From 57f186f054e0fe42d89ad22f73e48807dbc287ac Mon Sep 17 00:00:00 2001 From: H-Chris233 Date: Fri, 29 May 2026 11:07:07 +0800 Subject: [PATCH] test: make capsule Spaces contract cross-platform --- .../app/scripts/macos-capsule-spaces-contract.test.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openless-all/app/scripts/macos-capsule-spaces-contract.test.mjs b/openless-all/app/scripts/macos-capsule-spaces-contract.test.mjs index 540ccc0f..0d48305a 100644 --- a/openless-all/app/scripts/macos-capsule-spaces-contract.test.mjs +++ b/openless-all/app/scripts/macos-capsule-spaces-contract.test.mjs @@ -6,7 +6,9 @@ function assertMatch(source, pattern, name) { } } -const coordinatorRs = await readFile(new URL('../src-tauri/src/coordinator.rs', import.meta.url), 'utf-8'); +const coordinatorRs = ( + await readFile(new URL('../src-tauri/src/coordinator.rs', import.meta.url), 'utf-8') +).replace(/\r\n/g, '\n'); const functionMatch = coordinatorRs.match( /#\[cfg\(target_os = "macos"\)\]\s*fn show_capsule_window_no_activate[\s\S]*?\n}\n\n#\[cfg\(target_os = "linux"\)\]/, );