Skip to content

Commit

Permalink
PROBE
Browse files Browse the repository at this point in the history
  • Loading branch information
gilch committed Oct 4, 2024
1 parent c064cf5 commit b6cd947
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

import subprocess as sp
from sys import executable as python
from textwrap import dedent


Expand All @@ -21,17 +22,17 @@ def test_c_args():


def test_reproducible_gensym():
out, err = once = cmd(["python", "-m", "hissp", "-c", '(print `$#G `($#G $#G))'])
again = cmd(["python", "-m", "hissp", "-c", '(print `$#G `($#G $#G))'])
out, err = once = cmd([python, "-m", "hissp", "-c", "(print `$#G `($#G $#G))"])
again = cmd([python, "-m", "hissp", "-c", "(print `$#G `($#G $#G))"])
assert once == again
assert err == ""
assert "_Qz" in out


def test_unique_gensyms():
err = [None] * 2
once, err[0] = cmd(["python", "-m", "hissp", "-c", '(print `$#G `($#G $#G))'])
again, err[1] = cmd(["python", "-m", "hissp", "-c", '0 (print `$#G `($#G $#G))'])
once, err[0] = cmd([python, "-m", "hissp", "-c", "(print `$#G `($#G $#G))"])
again, err[1] = cmd([python, "-m", "hissp", "-c", "0 (print `$#G `($#G $#G))"])
assert err == ["", ""]
assert once != again
assert "_Qz" in once
Expand Down

0 comments on commit b6cd947

Please sign in to comment.