File: run.t

package info (click to toggle)
ocaml-odoc 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,744 kB
  • sloc: ml: 37,049; makefile: 124; sh: 79
file content (20 lines) | stat: -rw-r--r-- 1,106 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  $ compile good_ref.mli

  $ compile bad_ref.mli
  File "bad_ref.mli", line 7, characters 8-18:
  Warning: Failed to resolve reference unresolvedroot(( * )) Couldn't find "( * )"
  File "bad_ref.mli", line 3, characters 8-18:
  Warning: Failed to resolve reference unresolvedroot(( ^ )) Couldn't find "( ^ )"

  $ jq_scan_references() { jq -c '.. | .["`Reference"]? | select(.) | .[0]'; }

  $ odoc_print good_ref.odocl | jq_scan_references
  {"`Resolved":{"`Identifier":{"`Value":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Good_ref"]},"(^)"]}}}
  {"`Resolved":{"`Identifier":{"`Value":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Good_ref"]},"(^)"]}}}
  {"`Resolved":{"`Identifier":{"`Value":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Good_ref"]},"(^)"]}}}
  {"`Resolved":{"`Identifier":{"`Value":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Good_ref"]},"(*)"]}}}
  {"`Resolved":{"`Identifier":{"`Value":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Good_ref"]},"(*)"]}}}

  $ odoc_print bad_ref.odocl | jq_scan_references
  {"`Root":["( ^ )","`TUnknown"]}
  {"`Root":["( * )","`TUnknown"]}