Skip to content

Commit

Permalink
Overhaul of file-based tests; uses sed
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Mar 5, 2023
1 parent d2cf3d3 commit b1ac07d
Show file tree
Hide file tree
Showing 10 changed files with 896 additions and 66 deletions.
238 changes: 238 additions & 0 deletions test/debugger_pp_format.expected.log

Large diffs are not rendered by default.

121 changes: 121 additions & 0 deletions test/debugger_sexp_printbox.expected.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

BEGIN DEBUG SESSION at time YYYY-MM-DD HH:MM:SS.NNNNNN
"test/test_debug_sexp.ml":6:19-8:15 at time
YYYY-MM-DD HH:MM:SS.NNNNNN: foo
├─x = 7
└─foo = (7 8 16)
"test/test_debug_sexp.ml":13:19-13:73 at time
YYYY-MM-DD HH:MM:SS.NNNNNN: bar
├─x = ((first 7) (second 42))
└─bar = 336
"test/test_debug_sexp.ml":16:19-17:67 at time
YYYY-MM-DD HH:MM:SS.NNNNNN: baz
├─x = ((first 7) (second 42))
└─baz = 339
"test/test_debug_sexp.ml":20:24-26:9 at time
YYYY-MM-DD HH:MM:SS.NNNNNN: loop
├─depth = 0
├─x = ((first 7) (second 42))
├─"test/test_debug_sexp.ml":24:8:
│ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ ├─depth = 1
│ │ ├─x = ((first 41) (second 9))
│ │ ├─"test/test_debug_sexp.ml":24:8:
│ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ ├─depth = 2
│ │ │ │ ├─x = ((first 8) (second 43))
│ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ ├─depth = 3
│ │ │ │ │ ├─x = ((first 44) (second 4))
│ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ ├─depth = 4
│ │ │ │ │ │ ├─x = ((first 5) (second 22))
│ │ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ │ ├─depth = 5
│ │ │ │ │ │ │ ├─x = ((first 23) (second 2))
│ │ │ │ │ │ │ └─loop = 25
│ │ │ │ │ │ └─loop = 25
│ │ │ │ │ └─loop = 25
│ │ │ │ └─loop = 25
│ │ │ └─y = 25
│ │ ├─"test/test_debug_sexp.ml":25:8:
│ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ ├─depth = 2
│ │ │ │ ├─x = ((first 10) (second 25))
│ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ ├─depth = 3
│ │ │ │ │ ├─x = ((first 26) (second 5))
│ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ ├─depth = 4
│ │ │ │ │ │ ├─x = ((first 6) (second 13))
│ │ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ │ ├─depth = 5
│ │ │ │ │ │ │ ├─x = ((first 14) (second 3))
│ │ │ │ │ │ │ └─loop = 17
│ │ │ │ │ │ └─loop = 17
│ │ │ │ │ └─loop = 17
│ │ │ │ └─loop = 17
│ │ │ └─z = 17
│ │ └─loop = 24
│ └─y = 24
├─"test/test_debug_sexp.ml":25:8:
│ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ ├─depth = 1
│ │ ├─x = ((first 43) (second 24))
│ │ ├─"test/test_debug_sexp.ml":24:8:
│ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ ├─depth = 2
│ │ │ │ ├─x = ((first 23) (second 45))
│ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ ├─depth = 3
│ │ │ │ │ ├─x = ((first 46) (second 11))
│ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ ├─depth = 4
│ │ │ │ │ │ ├─x = ((first 12) (second 23))
│ │ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ │ ├─depth = 5
│ │ │ │ │ │ │ ├─x = ((first 24) (second 6))
│ │ │ │ │ │ │ └─loop = 30
│ │ │ │ │ │ └─loop = 30
│ │ │ │ │ └─loop = 30
│ │ │ │ └─loop = 30
│ │ │ └─y = 30
│ │ ├─"test/test_debug_sexp.ml":25:8:
│ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ ├─depth = 2
│ │ │ │ ├─x = ((first 25) (second 30))
│ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ ├─depth = 3
│ │ │ │ │ ├─x = ((first 31) (second 12))
│ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ ├─depth = 4
│ │ │ │ │ │ ├─x = ((first 13) (second 15))
│ │ │ │ │ │ ├─"test/test_debug_sexp.ml":20:24-26:9 at time
│ │ │ │ │ │ │ YYYY-MM-DD HH:MM:SS.NNNNNN: loop
│ │ │ │ │ │ │ ├─depth = 5
│ │ │ │ │ │ │ ├─x = ((first 16) (second 6))
│ │ │ │ │ │ │ └─loop = 22
│ │ │ │ │ │ └─loop = 22
│ │ │ │ │ └─loop = 22
│ │ │ │ └─loop = 22
│ │ │ └─z = 22
│ │ └─loop = 29
│ └─z = 29
└─loop = 36
Loading

0 comments on commit b1ac07d

Please sign in to comment.