From 5479749350c1a49f80ddccb09ca6d021bebd0c5e Mon Sep 17 00:00:00 2001 From: Emile Trotignon Date: Thu, 16 May 2024 16:34:42 +0200 Subject: [PATCH] add test for new combination of flags --- test/pages/errors.t/run.t | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/test/pages/errors.t/run.t b/test/pages/errors.t/run.t index f899f0ddda..778a984d7b 100644 --- a/test/pages/errors.t/run.t +++ b/test/pages/errors.t/run.t @@ -7,21 +7,26 @@ Let's check for expected errors. We need to match parents with children $ odoc compile -c dummy top1.mld $ odoc compile -I . --parent top1 sub1.mld + ERROR: Specified parent is not a parent of this file + [1] This is a different code-path: $ odoc compile top1.mld --child foo $ odoc compile -I . --parent top1 sub1.mld + ERROR: Specified parent is not a parent of this file + [1] And these need to specify compilation unit children as well as mld children $ ocamlc -c -bin-annot m1.mli $ odoc compile m1.cmti -I . --parent top1 - ERROR: File "m1.cmti": - Specified parent is not a parent of this file + ERROR: Specified parent is not a parent of this file [1] Parents must be pages $ odoc compile top1.mld --child M1 $ odoc compile m1.cmti -I . --parent top1 + ERROR: Specified parent is not a parent of this file + [1] $ odoc compile sub1.mld -I . --parent module-M1 ERROR: Expecting page as parent [1] @@ -29,6 +34,23 @@ Parents must be pages Linking checks the children are all present: $ odoc compile top1.mld --child foo $ odoc link page-top1.odoc -I . - File "page-top1.odoc": - Warning: Failed to lookup child page foo + + $ odoc compile --parent bla --parent-id blabla m1.mli + Either --parent or --parent-id should be specified, not both. + [2] + $ odoc compile --parent bla --package blabla m1.mli + Either --package or --parent should be specified, not both. + [2] + $ odoc compile --package bla --child foo -- m1.mli + --child can only be passed with --parent. + [2] + $ odoc compile --parent-id bla --child foo -- m1.mli + --child can only be passed with --parent. + [2] + $ odoc compile --package bla --output-dir foo -- m1.mli + --output-dir can only be passed with --parent-id. + [2] + $ odoc compile --parent bla --output-dir foo -- m1.mli + --output-dir can only be passed with --parent-id. + [2]