Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tests/test_d3d12_switches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

python -I tests/test_d3d12_switches.py

Sources written by hand here; the last test runs on the repository's own. No build, no GPU, no game files.
Sources written by hand here; CommandTest runs on the repository's own. No build, no GPU, no game files.
"""
import contextlib
import io
Expand Down Expand Up @@ -171,6 +171,20 @@ def test_the_repository_is_listed_and_an_unwritable_path_is_one_line(self):
# A moved folder must not turn the list into an empty one.
self.assertGreater(data.count(b"| `LEONIDA_"), 300)

def test_the_tracked_switches_page_matches_the_sources(self):
switches = os.path.join(ROOT, "d3d12", "docs", "switches.md")
out, err = io.StringIO(), io.StringIO()
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(err):
code = ds.main(["--root", ROOT, "--check", switches])
self.assertEqual(
code,
0,
"d3d12/docs/switches.md is out of date (regenerate with "
"`python -I tools/d3d12_switches.py --out d3d12/docs/switches.md`):\n"
+ out.getvalue()
+ err.getvalue(),
)


if __name__ == "__main__":
unittest.main()