ctags: add test
Closes Homebrew/homebrew#35651. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
520442439f
commit
a248fdff1a
1 changed files with 20 additions and 0 deletions
|
@ -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__
|
||||
|
|
Loading…
Reference in a new issue