Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes #400
  • Loading branch information
lukaszsamson committed Jan 19, 2024
1 parent 41c3d27 commit 2e254a3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/commands/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
DebuggeeExited,
trackerFactory,
} from "../debugAdapter";
import * as os from "os";
import { reporter } from "../telemetry";

export type RunTestArgs = {
Expand Down Expand Up @@ -248,7 +249,15 @@ function buildTestCommandArgs(args: RunTestArgs): string[] {
}

if (args.filePath) {
result.push(`${args.filePath}${line}`);
// workaround for https://github.com/elixir-lang/elixir/issues/13225
// ex_unit file filters with windows path separators are broken on elixir < 1.16.1
// fortunately unix separators work correctly
// TODO remove this when we require elixir 1.17
const path =
os.platform() == "win32"
? args.filePath.replace("\\", "/")
: args.filePath;
result.push(`${path}${line}`);
}

return [...result, ...COMMON_ARGS];
Expand Down

0 comments on commit 2e254a3

Please sign in to comment.