Skip to content

Commit ffdd6de

Browse files
committed
fix normalization
1 parent 5902225 commit ffdd6de

File tree

1 file changed

+3
-3
lines changed
  • tests/build_tests/suggested_actions

1 file changed

+3
-3
lines changed

tests/build_tests/suggested_actions/input.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ const updateTests = process.argv[2] === "update";
2525
function postProcessStdout(output) {
2626
let result = output;
2727
result = result.trimEnd();
28-
// Normalize absolute paths in suggested_actions to stable project-relative ones
28+
// Normalize absolute suggested_actions paths to project-relative, POSIX-style paths
2929
result = result.replace(
30-
/(?:[A-Z]:)?[\\/][^\n]*?tests[\\/]build_tests[\\/]suggested_actions[\\/]/g,
31-
"tests/build_tests/suggested_actions/",
30+
/(?:[A-Z]:)?[\\/][^\n]*?(tests[\\/]build_tests[\\/]suggested_actions[\\/][^\s"]+)/g,
31+
(_match, relPath) => relPath.split(/[\\/]+/).join("/"),
3232
);
3333
return normalizeNewlines(result);
3434
}

0 commit comments

Comments
 (0)