-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nicolás Ojeda Bär <[email protected]>
- Loading branch information
Showing
6 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 3.0) |
5 changes: 5 additions & 0 deletions
5
test/blackbox-tests/test-cases/utop/utop-stubs.t/forutop/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(library | ||
(name forutop) | ||
(foreign_stubs | ||
(language c) | ||
(names forutop_stubs))) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/utop/utop-stubs.t/forutop/forutop.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
external hello_in_utop: unit -> string = "hello_in_utop" | ||
let run () = print_endline (hello_in_utop ()) |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/utop/utop-stubs.t/forutop/forutop_stubs.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <caml/alloc.h> | ||
|
||
value hello_in_utop(value v_unit) | ||
{ | ||
return caml_copy_string("hello in utop"); | ||
} |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/utop/utop-stubs.t/init_forutop.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Forutop.run ();; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$ dune utop forutop -- init_forutop.ml | ||
hello in utop |