Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd authored and gpetiot committed Feb 12, 2024
1 parent fb0666f commit 0689854
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/bin/mdx-test/expect/parts-begin-end/test-case.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ val x : int = 2

```ocaml file=parts-begin-end.ml,part=indented
```

```ocaml
# s ;;
```

```ocaml exec,file=parts-begin-end.ml,part=toto
```

```ocaml
# s ;;
```

```ocaml skip,file=parts-begin-end.ml,part=toto
```
26 changes: 26 additions & 0 deletions test/bin/mdx-test/expect/parts-begin-end/test-case.md.expected
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,29 @@ val x : int = 2
let () = fooooooooooooooooooooooooooooooooooooooooooo in
if not fooooooooo then foooooooooooo
```

```ocaml
# s ;;
Line 1, characters 1-2:
Error: Unbound value s
```

```ocaml exec,file=parts-begin-end.ml,part=toto
let x = 34
let f = 42.3
let s = "toto"
let fn x u = u x

let () =
print_int x;
print_float f
;;
```

```ocaml
# s ;;
- : string = "toto"
```

```ocaml skip,file=parts-begin-end.ml,part=toto
```

0 comments on commit 0689854

Please sign in to comment.