Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
asm6: add test
Browse files Browse the repository at this point in the history
Closes #26387.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
mnaberez authored and MikeMcQuaid committed Feb 4, 2014
1 parent a875c80 commit 860af6d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Library/Formula/asm6.rb
Expand Up @@ -10,4 +10,15 @@ def install
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

0 comments on commit 860af6d

Please sign in to comment.