3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-30 08:20:10 +00:00

tests/links/symlink: Check file count

And also that `src/dir/script.ys` exists
This commit is contained in:
Krystine Sherwin 2025-08-02 10:07:06 +12:00
parent ac419190d2
commit a215e3260a
No known key found for this signature in database

View file

@ -4,6 +4,7 @@ import sys
def main():
workdir, task = sys.argv[1:]
src = Path(workdir) / "src"
count = 0
for srcfile in src.iterdir():
if srcfile.name == "heredoc":
assert(not srcfile.is_symlink())
@ -13,6 +14,10 @@ def main():
else:
assert(srcfile.is_symlink() == (task == "link"))
assert(srcfile.name != "script.ys")
count += 1
assert(count == 4)
script_ys = src / "dir" / "script.ys"
assert(script_ys.exists())
if __name__ == "__main__":
main()