codequery: make test compatible with sandbox
The test attempted to write to the formula's `share/test/` directory. Instead, it now symlinks the test data into temporary test directory and places its intermediate output there.
This commit is contained in:
parent
b6397916ee
commit
43f38193dc
1 changed files with 8 additions and 4 deletions
|
@ -25,9 +25,13 @@ class Codequery < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
cd share+"test" do
|
||||
system "#{bin}/cqmakedb", "-s", "./codequery.db", "-c", "./cscope.out", "-t", "./tags", "-p"
|
||||
assert_match "info_platform", `#{bin}/cqsearch -s ./codequery.db -t 'info_platform'`
|
||||
end
|
||||
test_files = (share/"test").children
|
||||
testpath.install_symlink test_files
|
||||
system "#{bin}/cqmakedb", "-s", "./codequery.db",
|
||||
"-c", "./cscope.out",
|
||||
"-t", "./tags",
|
||||
"-p"
|
||||
output = shell_output("#{bin}/cqsearch -s ./codequery.db -t info_platform")
|
||||
assert_match "info_platform", output
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue