aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike Naberezny2014-02-03 10:34:03 -0800
committerMike McQuaid2014-02-03 19:33:34 +0000
commitf6311cb271c6d9cd49582fc2b767c5614815cfd6 (patch)
tree8a27e81b7b81063844b0afc941c866bd10df231d /Library
parent91c60b9b5ea7f53d013997a13effbac5e9292d86 (diff)
downloadhomebrew-f6311cb271c6d9cd49582fc2b767c5614815cfd6.tar.bz2
acme: improve test by assembling a small file
Closes #26385. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/acme.rb11
1 files changed, 10 insertions, 1 deletions
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