aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike Naberezny2014-02-02 16:37:19 -0800
committerAdam Vandenberg2014-02-02 20:34:45 -0800
commit9941d3b0c1646e19efdac3dd81d3323ccdb51cdb (patch)
tree66b4cbcc2f7b32e8f720ddcaacdd1decc89637fd /Library
parentb41d31bb8e533d000b1bb6ae43bea712f9f8d50f (diff)
downloadhomebrew-9941d3b0c1646e19efdac3dd81d3323ccdb51cdb.tar.bz2
z80asm: improve test by assembling a small file
Closes #26363. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/z80asm.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Formula/z80asm.rb b/Library/Formula/z80asm.rb
index 12d63c843..f7e705f88 100644
--- a/Library/Formula/z80asm.rb
+++ b/Library/Formula/z80asm.rb
@@ -13,6 +13,11 @@ class Z80asm < Formula
end
test do
- system bin/'z80asm', '-V'
+ path = testpath/"a.asm"
+ path.write "call 1234h\n"
+
+ system bin/"z80asm", path
+ code = File.open(testpath/"a.bin", "rb") { |f| f.read.unpack("C*") }
+ assert_equal [0xcd, 0x34, 0x12], code
end
end