formulahendry / formulahendry/vscode-dotnet-test-explorer

Run Test fails with Theories

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
208
Forks
93
PR merge metrics
No merged PRs in 30d

Description

"Run Test" includes the value of arguments when executing a test. This causes a syntax error in bash which can't be fixed by escaping the string since Xunit reports an incorrect format for `TestCaseFilter`.

## Example

```F#
[]
let isEven x = Assert.True((x % 2) = 0)
```

### Expected

```Bash
dotnet test --filter FullyQualifiedName~isEven
# ...
# Total tests: 2. Passed: 2. Failed: 0. Skipped: 0.
# Test Run Successful
```

### Actual

```Bash
dotnet test --filter FullyQualifiedName~isEven(x: 6)
# bash: syntax error near unexpected token `('
```

I doubt that it's possible to select only one set of data since "isEven(x: 6)" could refer to either `isEven` or ` ``isEven(x: 6)`` ` which are both valid names (though Xunit currently doesn't find the latter).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.