aboutsummaryrefslogtreecommitdiff
path: root/src/testing/run_example_js.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/run_example_js.go')
-rw-r--r--src/testing/run_example_js.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/testing/run_example_js.go b/src/testing/run_example_js.go
index 472e0c57fa..1d4164b61f 100644
--- a/src/testing/run_example_js.go
+++ b/src/testing/run_example_js.go
@@ -26,6 +26,7 @@ func runExample(eg InternalExample) (ok bool) {
stdout := os.Stdout
f := createTempFile(eg.Name)
os.Stdout = f
+ finished := false
start := time.Now()
// Clean up in a deferred call so we can recover if the example panics.
@@ -50,11 +51,12 @@ func runExample(eg InternalExample) (ok bool) {
}
err := recover()
- ok = eg.processRunResult(out, timeSpent, err)
+ ok = eg.processRunResult(out, timeSpent, finished, err)
}()
// Run example.
eg.F()
+ finished = true
return
}