Muki-SkyWalker / specs

Automatically exported from code.google.com/p/specs
Other
0 stars 0 forks source link

StringIndexOutOfBoundsException in TestInterfaceNotifier.decrementPadding #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

class ErrorTest extends org.specs.Specification {
  "generate error" should {
    if (1 == 1) throw new Error()
  }
}

Run from SBT to use the TestInterfaceNotifier.

What is the expected output? What do you see instead?

expect: Error is reported.
actual: 

{{{
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
    at java.lang.String.substring(String.java:1937)
    at scala.collection.immutable.StringOps.slice(StringOps.scala:29)
    at scala.collection.immutable.StringOps.slice(StringOps.scala:20)
    at scala.collection.IndexedSeqLike$class.take(IndexedSeqLike.scala:195)
    at scala.collection.immutable.StringOps.take(StringOps.scala:20)
    at
org.specs.runner.TestInterfaceNotifier.decrementPadding(TestInterfaceRunner.scal
a:71)
    at
org.specs.runner.TestInterfaceNotifier.systemError(TestInterfaceRunner.scala:111
)
    at
org.specs.runner.NotifierRunner$$anonfun$reportSystem$3$$anonfun$apply$3.apply(N
otifierRunner.scala:81)
    at
org.specs.runner.NotifierRunner$$anonfun$reportSystem$3$$anonfun$apply$3.apply(N
otifierRunner.scala:80)
    at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:97)
    at scala.collection.immutable.List.foreach(List.scala:46)
    at
org.specs.runner.NotifierRunner$$anonfun$reportSystem$3.apply(NotifierRunner.sca
la:80)
    at
org.specs.runner.NotifierRunner$$anonfun$reportSystem$3.apply(NotifierRunner.sca
la:79)
    at scala.collection.IndexedSeqLike$class.foreach(IndexedSeqLike.scala:87)
    at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:20)
    at org.specs.runner.NotifierRunner.reportSystem(NotifierRunner.scala:79)
    at
org.specs.runner.NotifierRunner$$anonfun$reportASpecification$3.apply(NotifierRu
nner.scala:65)
    at
org.specs.runner.NotifierRunner$$anonfun$reportASpecification$3.apply(NotifierRu
nner.scala:64)
    at scala.collection.LinearSeqLike$class.foreach(LinearSeqLike.scala:97)
    at scala.collection.immutable.List.foreach(List.scala:46)
    at
org.specs.runner.NotifierRunner.reportASpecification(NotifierRunner.scala:64)
    at org.specs.runner.NotifierRunner.report(NotifierRunner.scala:57)
    at org.specs.runner.NotifierRunner.report(NotifierRunner.scala:44)
    at org.specs.runner.Reporter$class.reportSpecs(Reporter.scala:179)
    at org.specs.runner.NotifierRunner.reportSpecs(NotifierRunner.scala:44)
    at
org.specs.runner.TestInterfaceRunner$$anonfun$run$1.apply(TestInterfaceRunner.sc
ala:32)
    at
org.specs.runner.TestInterfaceRunner$$anonfun$run$1.apply(TestInterfaceRunner.sc
ala:32)
    at scala.Option.map(Option.scala:74)
    at org.specs.runner.TestInterfaceRunner.run(TestInterfaceRunner.scala:32)
    at sbt.TestRunner.runTest$1(TestFramework.scala:43)
}}}

What version of the product are you using? On what operating system?

1.6.2 for Scala 2.8.0 Beta1 RC8.

Please provide any additional information below.

decrementWhitepace should handle the case when a system error is reported
before any examples are started.

Original issue reported on code.google.com by jzaugg on 24 Jan 2010 at 12:14

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1208.

Original comment by etorrebo...@gmail.com on 26 Jan 2010 at 11:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by etorrebo...@gmail.com on 14 Feb 2010 at 2:43