Test compiling C program
This commit is contained in:
parent
ab9b278304
commit
8ee13dde4d
|
@ -0,0 +1,5 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(executable
|
||||
((name run)
|
||||
(libraries (jbuilder.configurator))))
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
let () =
|
||||
Configurator.main ~name:"c_test" (fun t ->
|
||||
let c_result =
|
||||
Configurator.c_test t {c|
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
printf("Hello, World!");
|
||||
return 0;
|
||||
}
|
||||
|c} in
|
||||
assert c_result;
|
||||
print_endline "Successfully compiled c program"
|
||||
)
|
|
@ -1,2 +1,3 @@
|
|||
$ jbuilder exec config/run.exe
|
||||
version is present
|
||||
$ jbuilder exec c_test/run.exe
|
Loading…
Reference in New Issue