aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike Naberezny2014-02-12 12:17:10 -0800
committerAdam Vandenberg2014-02-12 19:34:01 -0800
commit71b5539e897d8e4423f786c6cb66ca35620adb7f (patch)
treee5e7423dd30c245ddbc55c2c86060b85519b61d3 /Library/Formula
parentca0b4649e470e4edbcd646ea1c74d6dfc18ac24d (diff)
downloadhomebrew-71b5539e897d8e4423f786c6cb66ca35620adb7f.tar.bz2
gputils: add test
Closes #26664. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gputils.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/gputils.rb b/Library/Formula/gputils.rb
index a20712c8b..196fab90a 100644
--- a/Library/Formula/gputils.rb
+++ b/Library/Formula/gputils.rb
@@ -9,4 +9,16 @@ class Gputils < Formula
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make install"
end
+
+ test do
+ # assemble with gpasm
+ (testpath/"test.asm").write " movlw 0x42\n end\n"
+ system "#{bin}/gpasm -p p16f84 test.asm"
+ assert File.exist?("test.hex")
+
+ # disassemble with gpdasm
+ output = `#{bin}/gpdasm -p p16f84 test.hex`
+ assert_equal "000000: 3042 movlw\t0x42\n", output
+ assert_equal 0, $?.exitstatus
+ end
end