Commit 356d77b
committed
Fix resources path computation in test setup
The resources path is set based on the path of the current assembly.
The problem is that the assembly directory has a different number of
components, depending on whether the Configuration environment variable
is set or not.
Therefore, the previous code, that depended on the number of subdirs,
would fail if there is no value for the Configuration environment
variable.
The new code looks for the occurrence of a well-known string in the path
and bases the path of the test resources off that position.
It is still pretty sub-optimal, but I think it's a bit less sub-optimal
than it was.
Tested in the following ways:
- run dotnet test on one test from the command line on Windows;
- click on "Run Test" from Visual Studio Code.
Fixes #1629.1 parent 0a9c84d commit 356d77b
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
0 commit comments