forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add future to lock in the bug I found with chpldoc linking behavior (c…
…hapel-lang#24641) [new test, not reviewed] The documentation for a nested record can't link to symbols defined at the same level as it. This should be something it can do (and is something it can do for functions defined at the same level) Verified a fresh checkout of the test behaved as expected
- Loading branch information
Showing
7 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Could not find link for reference '#linkToPrev.func1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module linkToPrev { | ||
record foo { | ||
proc func1() { } | ||
|
||
// Seems to only be a problem for record's referring to functions at the | ||
// same level and when they are both in another type | ||
/* Returned by :proc:`func1` */ | ||
record innerFoo { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-o docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bug: can't link from nested type to sibling symbols | ||
#24625 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Found link for reference '#linkToPrev.func1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
import os | ||
import re | ||
|
||
testname = sys.argv[1] | ||
testout = sys.argv[2] | ||
|
||
html_file = f"docs/modules/linkToPrev.html" | ||
if not os.path.exists(html_file): | ||
with open(testout, "w") as f: | ||
print(f"Could not find '{html_file}'", file=f) | ||
exit() | ||
|
||
html_output = "" | ||
with open(html_file, "r") as f: | ||
html_output = f.read() | ||
|
||
output = [] | ||
|
||
if not re.search(f'<a class="reference internal" href="#linkToPrev.func1" title="linkToPrev2.func1">', html_output): | ||
output.append(f"Could not find link for reference '#linkToPrev.func1'") | ||
else: | ||
output.append(f"Found link for reference '#linkToPrev.func1'") | ||
|
||
with open(testout, "w") as f: | ||
print("\n".join(output), file=f) |