@@ -606,7 +606,7 @@ describe("Goals", () => {
606606 )
607607 })
608608
609- describe_only ("Unicode hole placement" , () => {
609+ describe ("Unicode hole placement" , () => {
610610 let filename = "UnicodeGoalPlacement.agda"
611611 let fileContent = ref ("" )
612612
@@ -616,46 +616,8 @@ describe("Goals", () => {
616616 fileContent := content
617617
618618 Js .log ("=== FILE CONTENT DEBUG ===" )
619- Js .log (` Filename: ${filename}` )
620- Js .log (` File path: ${Path.asset(filename)}` )
621619 Js .log (` Content length in bytes: ${Int.toString(String.length(content))}` )
622620 Js .log (` Content length in characters: ${Int.toString(Agda.OffsetConverter.characterWidth(content))}` )
623-
624- // Show first few lines for context
625- let lines = String .split (content , "\n " )
626- Js .log ("File content (first 10 lines):" )
627- let maxLine = Array .length (lines ) - 1
628- let endIndex = maxLine < 9 ? maxLine : 9
629- for i in 0 to endIndex {
630- switch lines [i ] {
631- | Some (line ) => Js .log (` ${Int.toString(i + 1)}: ${line}` )
632- | None => Js .log (` ${Int.toString(i + 1)}: <empty line>` )
633- }
634- }
635-
636- // Show Unicode character details for specific lines with goals
637- let targetLines = [11 , 15 , 19 , 23 , 27 , 31 ] // 0-based line indices
638- Js .log ("Unicode analysis of target lines:" )
639- Array .forEach (targetLines , lineIndex => {
640- if lineIndex < Array .length (lines ) {
641- switch lines [lineIndex ] {
642- | Some (line ) =>
643- Js .log (` Line ${Int.toString(lineIndex + 1)}: "${line}"` )
644- Js .log (` UTF-16 length: ${Int.toString(String.length(line))}` )
645- Js .log (` Logical length: ${Int.toString(Agda.OffsetConverter.characterWidth(line))}` )
646-
647- // Show character codes for debugging
648- let charCodes = []
649- for i in 0 to String .length (line ) - 1 {
650- charCodes -> Array .push (Int .toString (Float .toInt (String .charCodeAt (line , i ))))
651- }
652- if Array .length (charCodes ) > 0 {
653- Js .log (` Char codes: [${Array.join(charCodes, ", " )}]` )
654- }
655- | None => Js .log (` Line ${Int.toString(lineIndex + 1)}: <line not found>` )
656- }
657- }
658- })
659621 },
660622 )
661623 Async .afterEach (
@@ -686,15 +648,15 @@ describe("Goals", () => {
686648 "#6 [32:11-18)" , // Line 32: 𝐀𝔅ℂ𝐝 = {! !} - Unix position
687649 ]
688650 } else {
689- // Windows positions - may differ due to CRLF line endings
651+ // Windows positions - different due to CRLF line endings and Unicode handling
690652 [
691- "#0 [12:6-13 )" , // Line 12: 𝐱 = {! !} - Windows position (placeholder)
692- "#1 [16:10-17 )" , // Line 16: 𝐱𝐲𝐳 = {! !} - Windows position (placeholder)
693- "#2 [20:24-31 )" , // Line 20: 𝐍ormal-text-then-𝐱 = {! !} - Windows position (placeholder)
694- "#3 [24:12-19 )" , // Line 24: 𝐚 𝐱 𝐲 = {! !} {! !} - Windows position (placeholder)
695- "#4 [24:20-27 )" , // Line 24: second goal - Windows position (placeholder)
696- "#5 [28:6-13 )" , // Line 28: 𝐛 = ? -> {! !} - Windows position (placeholder)
697- "#6 [32:11-18 )" , // Line 32: 𝐀𝔅ℂ𝐝 = {! !} - Windows position (placeholder)
653+ "#0 [12:4-12 )" , // Windows position - from CI output
654+ "#1 [16:4-14 )" , // Windows position - from CI output
655+ "#2 [20:23-30 )" , // Windows position - from CI output
656+ "#3 [24:8-16 )" , // Windows position - from CI output
657+ "#4 [24:17-24 )" , // Windows position - from CI output
658+ "#5 [28:4-11 )" , // Windows position - from CI output
659+ "#6 [32:8-15 )" , // Windows position - from CI output
698660 ]
699661 }
700662
@@ -731,27 +693,8 @@ describe("Goals", () => {
731693
732694 Js .log ("=== UNICODE TEST DEBUG END ===" )
733695
734- // On Windows, temporarily log actual positions for analysis instead of failing
735- if ! OS .onUnix {
736- Js .log ("=== WINDOWS ACTUAL POSITIONS (for test update) ===" )
737- Array .forEachWithIndex (goalPositions , (pos , i ) =>
738- Js .log (` "#${Int.toString(i)} ${pos}", // Windows position` )
739- )
740- Js .log ("=== END WINDOWS POSITIONS ===" )
741-
742- // For now, just check that we have the expected number of goals on Windows
743- let expectedCount = Array .length (positions )
744- let actualCount = Array .length (goalPositions )
745- if actualCount != expectedCount {
746- Assert .fail (` Expected ${Int.toString(expectedCount)} goals on Windows, but got ${Int.toString(actualCount)}` )
747- } else {
748- // Positions detected correctly on Windows, but may differ due to CRLF - this is expected
749- Js .log ("Windows test passed: correct number of goals detected" )
750- }
751- } else {
752- // Unix/macOS - use strict position checking
753- Assert .deepStrictEqual (goalPositions , positions )
754- }
696+ // Use platform-specific position checking
697+ Assert .deepStrictEqual (goalPositions , positions )
755698
756699 await ctx -> AgdaMode .quit
757700 },
0 commit comments