コード例 #1
0
def test_A(capfd):
    run("""> +++++
           [ < +++++ +++++ +++ > - ]
           < .
        """, False)
    out, err = capfd.readouterr()
    assert err == u''
    assert out == 'A'
コード例 #2
0
def test_A(capfd):
    run(
        """> +++++
           [ < +++++ +++++ +++ > - ]
           < .
        """, False)
    out, err = capfd.readouterr()
    assert err == u''
    assert out == 'A'
コード例 #3
0
ファイル: targetbf.py プロジェクト: thoughtpolice/bf-pypy
def main(argv):
    if len(argv) < 2:
        print __doc__
        return 1

    f = None
    bconly = argv[1] == "--print-bc-only"
    if bconly:
        f = open_file_as_stream(argv[2])
    else:
        f = open_file_as_stream(argv[1])
    data = f.readall()
    f.close()

    run(data, bconly)
    return 0
コード例 #4
0
def test_interp():
    run('++++++', False)
コード例 #5
0
def test_interp():
    run('++++++', False)
コード例 #6
0
ファイル: test_jit.py プロジェクト: thoughtpolice/bf-pypy
 def main(i): run(codes[i], False)
 for i, _ in enumerate(codes):