Merge pull request #6167 from Kelimion/fix-6165

Fix #6165
This commit is contained in:
Jeroen van Rijn
2026-01-24 14:15:03 +01:00
committed by GitHub
4 changed files with 21 additions and 1 deletions

View File

@@ -6023,6 +6023,12 @@ gb_internal bool determine_path_from_string(BlockingMutex *file_mutex, Ast *node
has_windows_drive = true;
}
}
for (isize i = 0; i < original_string.len; i++) {
if (original_string.text[i] == '\\') {
original_string.text[i] = '/';
}
}
}
#endif

View File

@@ -28,6 +28,7 @@ set COMMON=-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused
..\..\..\odin test ..\test_issue_5699.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6068.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6101.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6165.odin %COMMON% || exit /b
@echo off

View File

@@ -35,7 +35,7 @@ $ODIN build ../test_issue_5265.odin $COMMON
$ODIN test ../test_issue_5699.odin $COMMON
$ODIN test ../test_issue_6068.odin $COMMON
$ODIN test ../test_issue_6101.odin $COMMON
$ODIN test ../test_issue_6165.odin $COMMON
set +x
popd

View File

@@ -0,0 +1,13 @@
// Tests issue #6165 https://github.com/odin-lang/Odin/issues/6165
package test_issues
import "core:testing"
@(test)
test_issue_6165 :: proc(t: ^testing.T) {
TXT :: #load(ODIN_ROOT + "LICENSE")
// We don't really care about the length. The test is whether this compiles, or
// if the compiler says it can't find the file we know to exist.
assert(len(TXT) > 0)
}