The alias-clash test was claiming which line the message names
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.
This commit is contained in:
parent
dc73b63446
commit
77ee428d4b
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user