Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove files that shouldn't be in testdata #30

Merged
merged 1 commit into from Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions octopy/__main__.py
@@ -1,3 +1,4 @@
import os
import sys

from octopy.assemble import assemble
Expand All @@ -9,19 +10,23 @@

f = open(sys.argv[1])

path, filename = os.path.split(sys.argv[1])
basename, ext = os.path.splitext(filename)


program = assemble(f)

if len(sys.argv) > 2:
outname = sys.argv[2]
else:
outname = sys.argv[1].split(".")[0] + ".ch8"
outname = basename + ".ch8"
fout = open(outname, 'w')
fout.buffer.write(program.program)

if len(sys.argv) > 3:
outname = sys.argv[3]
else:
outname = sys.argv[1].split(".")[0] + ".sym"
outname = basename + ".sym"

fout = open(outname, 'w')
for name, pc in program.labels.items():
Expand Down
4 changes: 2 additions & 2 deletions scripts/testprogram.sh
@@ -1,5 +1,5 @@
#!/bin/sh

# Test that the main program runs as expected
python3 -m octopy test/testdata/loop.8o
cmp test/testdata/loop.8o.ch8 test/testdata/loop.expect.ch8
python3 -m octopy test/testdata/fibble.8o
cmp fibble.ch8 test/testdata/fibble.expect.ch8
Binary file removed test/testdata/begin.ch8
Binary file not shown.
19 changes: 0 additions & 19 deletions test/testdata/begin.sym

This file was deleted.

Binary file removed test/testdata/calls.ch8
Binary file not shown.
22 changes: 0 additions & 22 deletions test/testdata/calls.sym

This file was deleted.

Binary file removed test/testdata/etc.ch8
Binary file not shown.
19 changes: 0 additions & 19 deletions test/testdata/etc.sym

This file was deleted.

Binary file removed test/testdata/loop.8o.ch8
Binary file not shown.
1 change: 0 additions & 1 deletion test/testdata/macro.8o.ch8

This file was deleted.

1 change: 0 additions & 1 deletion test/testdata/macro.ch8

This file was deleted.

20 changes: 0 additions & 20 deletions test/testdata/macro.sym

This file was deleted.

Binary file removed test/testdata/octoballs.8o.ch8
Binary file not shown.
Binary file removed test/testdata/sinusoid.8o.ch8
Binary file not shown.
Binary file removed test/testdata/unpack.ch8
Binary file not shown.
23 changes: 0 additions & 23 deletions test/testdata/unpack.sym

This file was deleted.