Files
sv2v/test/help/check_usage.py
Zachary Snow 7a7482c964 fix GitHub Actions setup
- refresh GitHub Actions versions
- manually install shUnit2 v2.1.8
- more portable usage check
- run-all.sh exits on ctrl-c
2024-05-01 09:07:31 -04:00

11 lines
346 B
Python

import subprocess
with open("../../README.md", "r") as file:
text_readme = file.read()
text_help = subprocess.check_output(["../../bin/sv2v", "--help"]).decode()
text_usage = "```\n" + "\n".join(text_help.split("\n")[2:-5]) + "\n```"
if text_usage not in text_readme:
raise RuntimeError(f"'{text_usage}' not found in '{text_readme}'")