Skip to content

Commit 30e2277

Browse files
committed
Merge branch 'feature/recover_windows_support'
* feature/recover_windows_support: fix - windows support fix - windows tests refact - recover windows support
2 parents 7e772a2 + 985eba5 commit 30e2277

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Keep test fixtures stable across platforms (avoid CRLF/LF mismatches)
2+
/tests/**/*.in text eol=lf
3+
/tests/**/*.out text eol=lf
4+
5+
# Also keep plain-text message fixtures stable
6+
/messages/**/*.txt text eol=lf

.github/workflows/github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
operating-system: [ubuntu-latest, macos-latest]
22+
operating-system: [ubuntu-latest, macos-latest, windows-latest]
2323
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
2424
steps:
2525
- uses: actions/checkout@v3

tests/run_all_tests.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@
248248
if (file_exists($caseOut)) {
249249
$expected = file_get_contents($caseOut);
250250
}
251+
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
252+
$got = str_replace("\r\n", "\n", $got);
253+
$expected = str_replace("\r\n", "\n", $expected);
254+
}
251255
if ($got != $expected) {
252256
$brokenTests[$caseOut] = $got;
253257
if (isset($opt['stop'])) {

0 commit comments

Comments
 (0)