@@ -112,7 +112,10 @@ class ExampleTester(
112112 case s " curl $rest" => s " curl --retry 7 --retry-all-errors $rest"
113113 case s => s
114114 }
115- Console .err.println(s " $workspacePath> $commandStr" )
115+
116+ /** The command we're about to execute */
117+ val debugCommandStr = s " $workspacePath> $commandStr"
118+ Console .err.println(debugCommandStr)
116119 Console .err.println(
117120 s """ --- Expected output ----------
118121 | ${expectedSnippets.mkString(" \n " )}
@@ -142,14 +145,16 @@ class ExampleTester(
142145 fansi.Str (res.out.text(), errorMode = fansi.ErrorMode .Strip ).plainText,
143146 fansi.Str (res.err.text(), errorMode = fansi.ErrorMode .Strip ).plainText
144147 ),
145- check
148+ check,
149+ debugCommandStr
146150 )
147151 }
148152
149153 def validateEval (
150154 expectedSnippets : Vector [String ],
151155 evalResult : IntegrationTester .EvalResult ,
152- check : Boolean = true
156+ check : Boolean = true ,
157+ command : String = " "
153158 ): Unit = {
154159 if (check) {
155160 if (expectedSnippets.exists(_.startsWith(" error: " ))) assert(! evalResult.isSuccess)
@@ -181,7 +186,11 @@ class ExampleTester(
181186 for (expectedLine <- unwrappedExpected.linesIterator) {
182187 Predef .assert(
183188 filteredOut.linesIterator.exists(globMatches(expectedLine, _)),
184- s " ==== filteredOut: \n $filteredOut\n ==== Missing expectedLine: \n $expectedLine"
189+ (if (command == " " ) " " else s " ==== command: \n $command\n " ) +
190+ s """ ==== filteredOut:
191+ | $filteredOut
192+ |==== Missing expectedLine:
193+ | $expectedLine""" .stripMargin
185194 )
186195 }
187196 }
0 commit comments