-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a test case for reading library names from a dune package
- Loading branch information
Showing
13 changed files
with
124 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,78 @@ | ||
Install the package | ||
|
||
$ PKG=can-read-library-names | ||
$ opam install packages/$PKG --yes > /dev/null | ||
|
||
Generate the can-read-library-names documentation | ||
|
||
$ voodoo-prep | ||
Warning: No universes have been specified: will generate dummy universes | ||
|
||
$ voodoo-do -p $PKG -b 2> /dev/null | ||
|
||
$ voodoo-gen -o output | ||
0 other versions, 1 packages | ||
Found 5 files | ||
|
||
Generates a package.json file with the library names | ||
$ cat output/p/$PKG/1.0/package.json | jq . | ||
{ | ||
"libraries": [ | ||
{ | ||
"name": "can-read-library-names.singleton", | ||
"modules": [ | ||
{ | ||
"name": "Singleton", | ||
"submodules": [], | ||
"kind": "module" | ||
} | ||
], | ||
"dependencies": [] | ||
}, | ||
{ | ||
"name": "can-read-library-names.unwrapped", | ||
"modules": [ | ||
{ | ||
"name": "Unwrapped_module2", | ||
"submodules": [], | ||
"kind": "module" | ||
}, | ||
{ | ||
"name": "Unwrapped_module1", | ||
"submodules": [], | ||
"kind": "module" | ||
} | ||
], | ||
"dependencies": [] | ||
}, | ||
{ | ||
"name": "can-read-library-names.wrapped", | ||
"modules": [ | ||
{ | ||
"name": "Wrapped", | ||
"submodules": [ | ||
{ | ||
"name": "Wrapped_module2", | ||
"submodules": [], | ||
"kind": "module" | ||
}, | ||
{ | ||
"name": "Wrapped_module1", | ||
"submodules": [], | ||
"kind": "module" | ||
} | ||
], | ||
"kind": "module" | ||
} | ||
], | ||
"dependencies": [] | ||
} | ||
] | ||
} | ||
|
||
Converted the README.org file in HTML | ||
$ cat output/p/$PKG/1.0/README.org.html.json | jq '.content' | ||
cat: output/p/can-read-library-names/1.0/README.org.html.json: No such file or directory | ||
|
||
Uninstall the package | ||
$ opam remove $PKG --yes > /dev/null |
27 changes: 27 additions & 0 deletions
27
test/packages/can-read-library-names/can-read-library-names.opam
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,27 @@ | ||
opam-version: "2.0" | ||
name: "can-read-library-names" | ||
version: "1.0" | ||
synopsis: "Test" | ||
description: "Test" | ||
maintainer: ["me"] | ||
authors: ["me"] | ||
homepage: "http://github.com" | ||
bug-reports: "http://github.com" | ||
depends: [ | ||
"dune" | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] |
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 @@ | ||
(lang dune 3.12) | ||
(name can-read-library-names) |
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,3 @@ | ||
(library | ||
(name wrapped) | ||
(public_name can-read-library-names.wrapped)) |
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 @@ | ||
let x = "hello" |
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 @@ | ||
let x = "hello" |
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,3 @@ | ||
(library | ||
(name singleton) | ||
(public_name can-read-library-names.singleton)) |
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 @@ | ||
let x = "hello" |
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,4 @@ | ||
(library | ||
(name unwrapped) | ||
(wrapped false) | ||
(public_name can-read-library-names.unwrapped)) |
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 @@ | ||
let y = "hello" |
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 @@ | ||
let y = "hello" |
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 @@ | ||
(test | ||
(name test_test_project)) |
Empty file.