From 77ee428d4b100ab92491db2e461cb7f8cbf465f3 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 12 Sep 2026 16:48:51 +0700 Subject: [PATCH] The alias-clash test was claiming which line the message names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It does not get to. Which of the two imports is refused is whichever arrived second, which follows the entry file's textual order — reverse the two lines and the message moves from the package's import to the program's. Both refusals are correct and the needle matches either, so the test was green while its comment was wrong. The comment now says what the case actually tests: that a clash is caught when its two halves are a directory apart, rather than side by side as in pkg-two-aliases. --- test/test_acceptance.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_acceptance.ml b/test/test_acceptance.ml index 7779c2c..3a6e530 100644 --- a/test/test_acceptance.ml +++ b/test/test_acceptance.ml @@ -1116,9 +1116,12 @@ let () = package it came back to. *) (* And the same rule through a chain, which is the case that only exists once a package may import a package: area imports shape as [shape] and - the program imports the same directory as [sh]. The refusal has to point - at the package's own import line, since that is the half the person - reading the entry file cannot see. *) + the program imports the same directory as [sh]. Which of the two lines + the message names is whichever one arrived second, so it depends on the + order the entry file writes its imports in; both are correct refusals + and the needle deliberately does not pin it down. What is being tested + is that the clash is caught at all when the two halves are a page and a + directory apart, rather than side by side as in the case above. *) refuses "one directory under two aliases, through a package" "programs/pkg-alias-clash.flan" "one directory is one set of names"; (* A ring is refused and the ring is named. The needle is the chain, not