Skip to content

Commit

Permalink
test(swiftpm): Avoid a hard-coded path in test results
Browse files Browse the repository at this point in the history
Also fix the `REPLACE_ABSOLUTE_DEFINITION_FILE_PATH` placeholder to be
invariant, just like `REPLACE_DEFINITION_FILE_PATH` is.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Jan 24, 2024
1 parent 7cb26cf commit 8ed897e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<REPLACE_ABSOLUTE_DEFINITION_FILE_PATH>'.\
\ Unknown file format version '3'."
severity: "ERROR"
2 changes: 1 addition & 1 deletion utils/test/src/main/kotlin/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fun patchExpectedResult(
val path = vcsDir.getPathToRoot(projectDir)

put("<REPLACE_DEFINITION_FILE_PATH>", "$path/${definitionFile.name}")
put("<REPLACE_ABSOLUTE_DEFINITION_FILE_PATH>", definitionFile.absolutePath)
put("<REPLACE_ABSOLUTE_DEFINITION_FILE_PATH>", definitionFile.absoluteFile.invariantSeparatorsPath)
put("<REPLACE_URL>", url)
put("<REPLACE_REVISION>", vcsDir.getRevision())
put("<REPLACE_PATH>", path)
Expand Down

0 comments on commit 8ed897e

Please sign in to comment.