From 8ed897e5f8e2fbcc3a5b1db63004a995218fdd37 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 23 Jan 2024 21:34:46 +0100 Subject: [PATCH] test(swiftpm): Avoid a hard-coded path in test results Also fix the `REPLACE_ABSOLUTE_DEFINITION_FILE_PATH` placeholder to be invariant, just like `REPLACE_DEFINITION_FILE_PATH` is. Signed-off-by: Sebastian Schuberth --- .../assets/projects/synthetic/expected-output-lockfile-v3.yml | 2 +- utils/test/src/main/kotlin/Utils.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/package-managers/swiftpm/src/funTest/assets/projects/synthetic/expected-output-lockfile-v3.yml b/plugins/package-managers/swiftpm/src/funTest/assets/projects/synthetic/expected-output-lockfile-v3.yml index 6f66a78c1517..a7a15c9a6a6a 100644 --- a/plugins/package-managers/swiftpm/src/funTest/assets/projects/synthetic/expected-output-lockfile-v3.yml +++ b/plugins/package-managers/swiftpm/src/funTest/assets/projects/synthetic/expected-output-lockfile-v3.yml @@ -19,6 +19,6 @@ packages: [] issues: - timestamp: "1970-01-01T00:00:00Z" source: "SwiftPM" - message: "Could not parse lockfile '/workspace/plugins/package-managers/swiftpm/src/funTest/assets/projects/synthetic/lockfile-v3/Package.resolved'.\ + message: "Could not parse lockfile ''.\ \ Unknown file format version '3'." severity: "ERROR" diff --git a/utils/test/src/main/kotlin/Utils.kt b/utils/test/src/main/kotlin/Utils.kt index 944a07f2e1c8..d80c3b29d595 100644 --- a/utils/test/src/main/kotlin/Utils.kt +++ b/utils/test/src/main/kotlin/Utils.kt @@ -102,7 +102,7 @@ fun patchExpectedResult( val path = vcsDir.getPathToRoot(projectDir) put("", "$path/${definitionFile.name}") - put("", definitionFile.absolutePath) + put("", definitionFile.absoluteFile.invariantSeparatorsPath) put("", url) put("", vcsDir.getRevision()) put("", path)