mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-26 19:09:48 -05:00
ansifilter: add test
Closes #26408. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
1 parent
4afd77708c
commit
91fbfe3fc7
1 file changed
+9
@@ -10,4 +10,13 @@ class Ansifilter < Formula
|
||||
system "make", "PREFIX=#{prefix}"
|
||||
system "make", "PREFIX=#{prefix}", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
path = testpath/"ansi.txt"
|
||||
path.write "f\x1b[31moo"
|
||||
|
||||
output = `#{bin}/ansifilter #{path}`.strip
|
||||
assert_equal "foo", output
|
||||
assert_equal 0, $?.exitstatus
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user