aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/csvprintf.rb
diff options
context:
space:
mode:
authorMike Naberezny2014-02-10 15:59:52 -0800
committerAdam Vandenberg2014-02-10 19:41:25 -0800
commitb2087f9ef71d8af9210a0930f13ca9a9e0aaa5cd (patch)
treeeeea2618445c54a6bbbf6b755f33991eeac071a5 /Library/Formula/csvprintf.rb
parentcc38e00de914515e095dab7cd27d19d341d78ba5 (diff)
downloadhomebrew-b2087f9ef71d8af9210a0930f13ca9a9e0aaa5cd.tar.bz2
csvprintf: add test
Closes #26595. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/csvprintf.rb')
-rw-r--r--Library/Formula/csvprintf.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/csvprintf.rb b/Library/Formula/csvprintf.rb
index b0c7b8fd0..f0cc8bdf5 100644
--- a/Library/Formula/csvprintf.rb
+++ b/Library/Formula/csvprintf.rb
@@ -11,4 +11,12 @@ class Csvprintf < Formula
"--prefix=#{prefix}"
system "make install"
end
+
+ test do
+ IO.popen("#{bin}/csvprintf -i '%2$s %1$s\n'", "w+") do |pipe|
+ pipe.write "Last,First\nSmith,Fred\n"
+ pipe.close_write
+ assert_equal "Fred Smith\n", pipe.read
+ end
+ end
end