mirror of
https://github.com/apple/pkl.git
synced 2026-08-05 19:58:41 +02:00
Fix snippet test mismatch between hotspot and native test (#1797)
This commit is contained in:
Vendored
+1
-1
@@ -1,3 +1,4 @@
|
||||
pkl: TRACE: items = new Listing { ? } (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
–– Pkl Error ––
|
||||
Tried to read property `undefinedValue` but its value is undefined.
|
||||
|
||||
@@ -24,4 +25,3 @@ at pkl.base#Module.output.text (pkl:base)
|
||||
xxx | if (renderer is BytesRenderer) renderer.renderDocument(value) else text.encodeToBytes("UTF-8")
|
||||
^^^^
|
||||
at pkl.base#Module.output.bytes (pkl:base)
|
||||
pkl: TRACE: items = new Listing { ? } (file:///$snippetsDir/input/errors/traceThenIterateUndefinedMember.pkl)
|
||||
|
||||
@@ -223,8 +223,11 @@ class LanguageSnippetTestsEngine : AbstractLanguageSnippetTestsEngine() {
|
||||
|
||||
val stderr = logWriter.toString().withUnixLineEndings()
|
||||
|
||||
// match native CLI: if an error happens, any WARN or TRACE gets emitted first, then the
|
||||
// error message
|
||||
val effectiveOutput = if (success) output + stderr else stderr + output
|
||||
return (success && stderr.isBlank()) to
|
||||
(output + stderr).stripFilePaths().stripWebsite().stripStdlibLocationSha()
|
||||
effectiveOutput.stripFilePaths().stripWebsite().stripStdlibLocationSha()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user