File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed
test/blackbox-tests/test-cases/pkg Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ A package that installs itself into the ocaml stdlib should work.
2
+
3
+ $ . ./ helpers. sh
4
+
5
+ $ mkdir nondune
6
+ $ cd nondune
7
+ $ cat > nondune. ml << EOF
8
+ > let main () = print_endline " Nondune"
9
+ > let () = main ()
10
+ > EOF
11
+ $ ocamlc -c nondune. ml
12
+ $ ocamlc -o nondune. cma -a nondune. cmo
13
+ $ cat > nondune. install << EOF
14
+ > lib_root: [
15
+ > " nondune.cma" {" ocaml/nondune.cma" }
16
+ > " nondune.cmi" {" ocaml/nondune.cmi" }
17
+ > ]
18
+ > lib : [
19
+ > " META" {" META" }
20
+ > ]
21
+ > EOF
22
+ $ cat > META << EOF
23
+ > directory = " ^"
24
+ > archive(byte) = " nondune.cma"
25
+ > EOF
26
+ $ cat > nondune. opam << EOF
27
+ > opam-version: " 2.0"
28
+ > build: [
29
+ > [true]
30
+ > ]
31
+ > EOF
32
+ $ cd ..
33
+
34
+ With this project set up, lets depend on it.
35
+
36
+ $ mkdir foo
37
+ $ cd foo
38
+ $ mkrepo
39
+ $ solve_project << EOF
40
+ > (lang dune 3.15 )
41
+ > (pin
42
+ > (url " file://$ PWD /../nondune" )
43
+ > (package (name nondune)))
44
+ > (package
45
+ > (name foo)
46
+ > (depends nondune))
47
+ > EOF
48
+ Solution for dune. lock:
49
+ - nondune. dev
50
+ $ cat > dune << EOF
51
+ > (executable
52
+ > (name foo)
53
+ > (modules foo)
54
+ > (libraries nondune)
55
+ > (modes byte))
56
+ > EOF
57
+ $ cat > foo. ml << EOF
58
+ > let () = Nondune. main ()
59
+ > EOF
60
+ $ dune exec ./ foo. exe 2 > &1 | grep -o " Unbound module Nondune"
61
+ Unbound module Nondune
You can’t perform that action at this time.
0 commit comments