mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-27 23:18:57 +00:00
tests/links: heredocs are never linked
This commit is contained in:
parent
2a16a48a60
commit
b80a843995
2 changed files with 10 additions and 1 deletions
|
@ -6,7 +6,13 @@ def main():
|
|||
workdir, task = sys.argv[1:]
|
||||
src = Path(workdir) / "src"
|
||||
for srcfile in src.iterdir():
|
||||
assert(srcfile.is_symlink() == (task == "link"))
|
||||
if srcfile.name == "heredoc":
|
||||
assert(not srcfile.is_symlink())
|
||||
with open(srcfile, "r") as f:
|
||||
local_contents = f.readline()
|
||||
assert(local_contents.strip() == 'log foo')
|
||||
else:
|
||||
assert(srcfile.is_symlink() == (task == "link"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue