ctags: add test

Closes Homebrew/homebrew#35651.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Xu Cheng 2015-01-08 13:39:22 +08:00 committed by Mike McQuaid
parent 520442439f
commit a248fdff1a

View file

@ -36,6 +36,26 @@ class Ctags < Formula
link.
EOS
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <stdio.h>
#include <stdlib.h>
void func()
{
printf("Hello World!");
}
int main()
{
func();
return 0;
}
EOS
system "#{bin}/ctags", "-R", "."
assert_match /func.*test\.c/, File.read("tags")
end
end
__END__