aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-18 16:16:16 -0500
committerJesse Luehrs <doy@tozt.net>2013-03-18 16:19:40 -0500
commit6791a833a94a28a6b4f7179dd8a08f565cd6c4eb (patch)
tree00358b1c48f6e9b2908d01fbddfea0cc8de4426b /src/test
parent761f40d02ce336fa811265e9fe14b12f4c50cf21 (diff)
downloadscala-test-more-6791a833a94a28a6b4f7179dd8a08f565cd6c4eb.tar.gz
scala-test-more-6791a833a94a28a6b4f7179dd8a08f565cd6c4eb.zip
fix broken backtracking behavior
don't even try recursing if the indentation isn't correct for it to potentially be a subtest. this was causing exponential behavior since it would try to parse a plan as a result, fail, then try to parse it as a subtest result, and try to treat it as the start of a plan-first tap stream when that shouldn't be possible at all because the indentation should indicate that it's not a subtest
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/com/iinteractive/test/SubtestsTest.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/scala/com/iinteractive/test/SubtestsTest.scala b/src/test/scala/com/iinteractive/test/SubtestsTest.scala
new file mode 100644
index 0000000..1e569b7
--- /dev/null
+++ b/src/test/scala/com/iinteractive/test/SubtestsTest.scala
@@ -0,0 +1,14 @@
+package com.iinteractive.test
+
+import java.io.ByteArrayOutputStream
+
+import com.iinteractive.test.tap.Parser
+
+// ensure subtest parsing works properly
+class SubtestsTest extends TestMore {
+ for (i <- 1 to 100) {
+ subtest ("subtest " + i) {
+ pass
+ }
+ }
+}