aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/csvprintf.rb
diff options
context:
space:
mode:
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