diff options
| author | Mike Naberezny | 2014-02-10 21:54:09 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-10 22:49:05 -0800 |
| commit | e47dd7f0841183c3e4f5d93ca094e19a17a252a8 (patch) | |
| tree | eae07d1a7e20950448e78121488d4c79006f346b /Library/Formula | |
| parent | c6a63aa05f33ef702b7974c880f409476931b294 (diff) | |
| download | homebrew-e47dd7f0841183c3e4f5d93ca094e19a17a252a8.tar.bz2 | |
cpmtools 2.17
Closes #26611.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/cpmtools.rb | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Library/Formula/cpmtools.rb b/Library/Formula/cpmtools.rb index 3088fe142..a3c49d8c3 100644 --- a/Library/Formula/cpmtools.rb +++ b/Library/Formula/cpmtools.rb @@ -2,8 +2,8 @@ require 'formula' class Cpmtools < Formula homepage 'http://www.moria.de/~michael/cpmtools/' - url 'http://www.moria.de/~michael/cpmtools/cpmtools-2.16.tar.gz' - sha1 'a63c381f868870f3a33ffacb552d5b4e8ede28eb' + url 'http://www.moria.de/~michael/cpmtools/cpmtools-2.17.tar.gz' + sha1 '71e9d3a7de4b366a52ac24e53c2958c2b8124e5f' def install system "./configure", "--prefix=#{prefix}" @@ -14,4 +14,24 @@ class Cpmtools < Formula system "make install" end + + test do + # make a disk image + image = testpath/"disk.cpm" + system "#{bin}/mkfs.cpm -f ibm-3740 #{image}" + + # copy a file into the disk image + src = testpath/"foo" + src.write "a" * 128 + system "#{bin}/cpmcp -f ibm-3740 #{image} #{src} 0:foo" + + # check for the file in the cp/m directory + assert `#{bin}/cpmls -f ibm-3740 #{image}`.include?("foo") + assert_equal 0, $?.exitstatus + + # copy the file back out of the image + dest = testpath/"bar" + system "#{bin}/cpmcp -f ibm-3740 #{image} 0:foo #{dest}" + assert_equal src.read, dest.read + end end |
