summaryrefslogtreecommitdiff
path: root/test/files/run/repl-trim-stack-trace.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/repl-trim-stack-trace.scala')
-rw-r--r--test/files/run/repl-trim-stack-trace.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/repl-trim-stack-trace.scala b/test/files/run/repl-trim-stack-trace.scala
index bbf46f2f19..db42b37fdd 100644
--- a/test/files/run/repl-trim-stack-trace.scala
+++ b/test/files/run/repl-trim-stack-trace.scala
@@ -13,6 +13,7 @@ f: Nothing
scala> f
java.lang.Exception: Uh-oh
at .f(<console>:7)
+ ... 69 elided
scala> def f = throw new Exception("")
f: Nothing
@@ -20,6 +21,7 @@ f: Nothing
scala> f
java.lang.Exception:
at .f(<console>:7)
+ ... 69 elided
scala> def f = throw new Exception
f: Nothing
@@ -27,7 +29,13 @@ f: Nothing
scala> f
java.lang.Exception
at .f(<console>:7)
+ ... 69 elided
scala> """
+ // remove the "elided" lines because the frame count is variable
+ lazy val elided = """\s+\.{3} (?:\d+) elided""".r
+ def filtered(lines: Seq[String]) = lines filter { case elided() => false ; case _ => true }
+ override def eval() = filtered(super.eval().toSeq).iterator
+ override def expected = filtered(super.expected).toList
}