diff --git a/tests/unused_func/Simple.t/custom_demo.ml b/tests/unused_func/Simple.t/custom_demo.ml new file mode 100644 index 0000000..3c0aa15 --- /dev/null +++ b/tests/unused_func/Simple.t/custom_demo.ml @@ -0,0 +1 @@ +let () = print_int (Custom_lib.Custom_lib_impl.incr 41) \ No newline at end of file diff --git a/tests/unused_func/Simple.t/custom_lib_impl.ml b/tests/unused_func/Simple.t/custom_lib_impl.ml new file mode 100644 index 0000000..7bf41f3 --- /dev/null +++ b/tests/unused_func/Simple.t/custom_lib_impl.ml @@ -0,0 +1 @@ +let incr n = n+1 \ No newline at end of file diff --git a/tests/unused_func/Simple.t/custom_lib_impl.mli b/tests/unused_func/Simple.t/custom_lib_impl.mli new file mode 100644 index 0000000..710be65 --- /dev/null +++ b/tests/unused_func/Simple.t/custom_lib_impl.mli @@ -0,0 +1 @@ +val incr : int -> int diff --git a/tests/unused_func/Simple.t/dune b/tests/unused_func/Simple.t/dune index 209b92f..f75f064 100644 --- a/tests/unused_func/Simple.t/dune +++ b/tests/unused_func/Simple.t/dune @@ -6,10 +6,17 @@ SecondTU ; ) - ; (flags - ; (:standard -dtypedtree)) (inline_tests) (preprocess - (pps ppx_expect ppx_inline_test)) - ;(libraries base angstrom) - ) + (pps ppx_expect ppx_inline_test))) + +(library + (name custom_lib) + (public_name Simple.Custom) + ;(package Simple) + (modules custom_lib_impl)) + +(executable + (name custom_demo) + (modules custom_demo) + (libraries custom_lib)) diff --git a/tests/unused_func/Simple.t/dune-project b/tests/unused_func/Simple.t/dune-project index 0171005..9a4c4bf 100644 --- a/tests/unused_func/Simple.t/dune-project +++ b/tests/unused_func/Simple.t/dune-project @@ -1,3 +1,6 @@ (lang dune 2.8) (cram enable) + +(package + (name Simple)) diff --git a/tests/unused_func/Simple.t/run.t b/tests/unused_func/Simple.t/run.t index d3ab843..7c66e65 100644 --- a/tests/unused_func/Simple.t/run.t +++ b/tests/unused_func/Simple.t/run.t @@ -1,5 +1,8 @@ - $ dune build + $ dune build @check $ dune describe $ zanuda -unused-decls . + module "Custom_lib" is omitted unused decl: Simple.Meow.meow unused decl: Simple.Meow.woof + unused decl: Custom_lib_impl.incr +# Custom_lib_impl.incr is not found because a custom public name for library 'custom_lib'