Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InlineData attribute with certain characters (e.g. 'ä','ö',etc.) breaks VS Test Explorer #4595

Closed
albpi opened this issue Jul 12, 2023 · 3 comments
Assignees
Labels

Comments

@albpi
Copy link

albpi commented Jul 12, 2023

Description

The program uses the File.Exists method to check that the passed filename value is actually present at the specified path. While it works fine when running in the Console App, it fails when setting up a test with VS Test explorer, if the value contains characters like 'ä' or 'ö' (and I suppose it will fail for other special characters) .

I think this issue is identical to this one.

Steps to reproduce

I am using .NET 7 and here is the test project setup:
image

I want to check that a file with name testä.xml exists. I have it in a folder and the relative path to it is ..\..\testä.xml
The method that fails in VS Test explorer is File.Exists .".\..\testä.xml".
It also fails when using dotnet test, that I believe is what VS Test uses under the hood.

Expected behavior

The result of File.Exists "..\..\testä.xml" should be true and the test should then succeed.

Actual behavior

The result of File.Exists ".\..\testä.xml"is false and the test then fails.

Environment

Windows OS 11
VS 2022

AB#1850367

@pavelhorak pavelhorak added this to the Future milestone Jul 12, 2023
@pavelhorak pavelhorak added sprint and removed sprint labels Jul 12, 2023
@arnesahlberg
Copy link

I see this too. A fix would be helpful.

@nohwnd nohwnd removed this from the Future milestone Aug 3, 2023
@MasonFI
Copy link

MasonFI commented May 2, 2024

I encountered this bug also. This should be fixed asap.

@nohwnd nohwnd assigned nohwnd and unassigned drognanar Jul 9, 2024
@nohwnd
Copy link
Member

nohwnd commented Jul 9, 2024

Used the repro linked in xunit, and this looks fixed:
image

@nohwnd nohwnd closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants