Skip to content

Commit e3720ba

Browse files
matmenclaude
andcommitted
tests: Unicode conformance files with any line endings
Windows checkouts turned them into CRLF, so the last break marker of each test line had a CR and failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJgRK5qpwJEbHPuFv6kgAQ
1 parent 8820219 commit e3720ba

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests/unicode/*.txt text eol=lf

‎tests/unicode.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const panic = message => {
1111
const {resolve, lineLevels, visualOrder, classOf, BIDI_CLASSES} = await import('../dist/render/bidi.js');
1212
const {lineBreaks} = await import('../dist/render/linebreak.js');
1313
const {graphemeBoundaries} = await import('../dist/render/segment.js');
14-
const lines = file => fs.readFileSync(`./tests/unicode/${file}`, 'utf8').split('\n').filter(line => line.trim() && !line.startsWith('#'));
14+
const lines = file => fs.readFileSync(`./tests/unicode/${file}`, 'utf8').split(/\r?\n/).filter(line => line.trim() && !line.startsWith('#'));
1515
const format = (levels, order) => `${Array.from(levels, l => l < 0 ? 'x' : l).join(' ')} / ${order.join(' ')}`;
1616

1717
// BidiTest.txt: classes, paragraph directions (1 auto, 2 left to right, 4 right to left)

0 commit comments

Comments
 (0)