Skip to content

Standard library test failure with read_link on Windows 10 #90669

Closed
@petrochenkov

Description

@petrochenkov
---- fs::tests::read_link stdout ----
thread 'fs::tests::read_link' panicked at 'assertion failed: `(left == right)`
  left: `"c:\\ProgramData"`,
 right: `"C:\\ProgramData"`', library\std\src\fs\tests.rs:836:9

The failing assert is

        // directory symlink
        assert_eq!(
            check!(fs::read_link(r"C:\Users\All Users")).to_str().unwrap(),
            r"C:\ProgramData"
        );

I don't know why my Windows is special in this way and the All Users symlink contains the drive letter C in lowercase, this version of Windows was pre-installed on an HP laptop.
Anyway, the Rust test suite fails due to this easily fixable mismatch.

Metadata

Metadata

Assignees

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.O-windowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions