asm6: add test
Closes Homebrew/homebrew#26387. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
c98326db57
commit
4a350ea1ab
1 changed files with 11 additions and 0 deletions
|
@ -10,4 +10,15 @@ class Asm6 < Formula
|
|||
system "#{ENV.cc} -o asm6 asm6.c"
|
||||
bin.install "asm6"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"a.asm").write <<-EOS
|
||||
org $c000
|
||||
jmp $fce2
|
||||
EOS
|
||||
|
||||
system bin/"asm6", "a.asm"
|
||||
code = File.open("a.bin", "rb") { |f| f.read.unpack("C*") }
|
||||
assert_equal [0x4c, 0xe2, 0xfc], code
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue