XDG library path support for OCaml via Eio capabilities
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xdge: drop redundant test_paths.ml duplicate (E610)

test_paths.ml redefined test_v and test_config_file_missing — both
already covered by test_xdge.ml's test_v and test_config_file_not_found
with the same assertions. Removing the file (and its dune entry, the
test.ml suite reference) since the coverage is preserved by test_xdge.

+2 -33
+1 -1
test/dune
··· 1 1 (test 2 2 (name test) 3 - (modules test test_xdge test_paths) 3 + (modules test test_xdge) 4 4 (libraries xdge eio eio_main alcotest fmt)) 5 5 6 6 (executable
+1 -1
test/test.ml
··· 3 3 SPDX-License-Identifier: ISC 4 4 ---------------------------------------------------------------------------*) 5 5 6 - let () = Alcotest.run "xdge" [ Test_xdge.suite; Test_paths.suite ] 6 + let () = Alcotest.run "xdge" [ Test_xdge.suite ]
-24
test/test_paths.ml
··· 1 - (*--------------------------------------------------------------------------- 2 - Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 - SPDX-License-Identifier: ISC 4 - ---------------------------------------------------------------------------*) 5 - 6 - let test_v () = 7 - Eio_main.run @@ fun env -> 8 - let xdg = Xdge.v env#fs "paths_test" in 9 - Alcotest.(check string) "app_name" "paths_test" (Xdge.app_name xdg) 10 - 11 - let test_config_file_missing () = 12 - Eio_main.run @@ fun env -> 13 - let xdg = Xdge.v env#fs "paths_test" in 14 - let result = Xdge.config_file xdg "no_such_file.conf" in 15 - Alcotest.(check (option string)) 16 - "not found" None 17 - (Option.map Eio.Path.native_exn result) 18 - 19 - let suite : string * unit Alcotest.test_case list = 20 - ( "paths", 21 - [ 22 - Alcotest.test_case "v" `Quick test_v; 23 - Alcotest.test_case "config_file missing" `Quick test_config_file_missing; 24 - ] )
-7
test/test_paths.mli
··· 1 - (*--------------------------------------------------------------------------- 2 - Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 - SPDX-License-Identifier: ISC 4 - ---------------------------------------------------------------------------*) 5 - 6 - val suite : string * unit Alcotest.test_case list 7 - (** [suite] is the Alcotest test suite for {!Xdge} path functionality. *)