File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
modules/docs-tests/src/main/scala/sclicheck Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ def mkBashScript(content: Seq[String]) =
139
139
| ${content.mkString(" \n " )}
140
140
| """ .stripMargin
141
141
142
+ def removeAnsiColors (str : String ) = str.replaceAll(" \\ e\\ [[0-9]+m" , " " )
143
+
142
144
private lazy val baseTmpDir = {
143
145
val random = new SecureRandom
144
146
val dirName = s " run- ${math.abs(random.nextInt.toLong)}"
@@ -251,7 +253,7 @@ def checkFile(file: os.Path, options: Options): Unit =
251
253
252
254
case Commands .Check (patterns, regex, line) =>
253
255
check(lastOutput != null , " No output stored from previous commands" )
254
- val lines = lastOutput.linesIterator.toList
256
+ val lines = lastOutput.linesIterator.toList.map(removeAnsiColors)
255
257
256
258
if regex then
257
259
patterns.foreach { pattern =>
You can’t perform that action at this time.
0 commit comments