aboutsummaryrefslogtreecommitdiff
path: root/regtest.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'regtest.tcl')
-rw-r--r--regtest.tcl18
1 files changed, 18 insertions, 0 deletions
diff --git a/regtest.tcl b/regtest.tcl
index a9ee5eb..99a65fe 100644
--- a/regtest.tcl
+++ b/regtest.tcl
@@ -388,6 +388,24 @@ puts "TEST 54 PASSED"
apply {{} {info frame 0}}
puts "TEST 55 PASSED"
+# json decode should not core dump on invalid input
+set json {
+{
+ "fossil":"9c65b5432e4aeecf3556e5550c338ce93fd861cc",
+ "timestamp":1435827337,
+ "command":"timeline/checkin", /* this is line 3 */
+ "procTimeUs":3333,
+}}
+catch {json::decode $json}
+puts "TEST 56 PASSED"
+
+if {[exists -command debug]} {
+ set f [open /dev/null w]
+ $f puts [debug objects]
+ $f close
+}
+puts "TEST 57 PASSED"
+
# TAKE THE FOLLOWING puts AS LAST LINE
puts "--- ALL TESTS PASSED ---"