From f6311cb271c6d9cd49582fc2b767c5614815cfd6 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Mon, 3 Feb 2014 10:34:03 -0800 Subject: acme: improve test by assembling a small file Closes #26385. Signed-off-by: Mike McQuaid --- Library/Formula/acme.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/acme.rb b/Library/Formula/acme.rb index d98494887..07ee7a131 100644 --- a/Library/Formula/acme.rb +++ b/Library/Formula/acme.rb @@ -13,6 +13,15 @@ class Acme < Formula end test do - system bin/'acme', '-V' + path = testpath/"a.asm" + path.write <<-EOS + !to "a.out", cbm + * = $c000 + jmp $fce2 + EOS + + system bin/"acme", path + code = File.open(testpath/"a.out", "rb") { |f| f.read.unpack("C*") } + assert_equal [0x00, 0xc0, 0x4c, 0xe2, 0xfc], code end end -- cgit v1.2.3