mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 02:51:57 +00:00
Enhance index test selection filtering
This commit is contained in:
parent
4781e9a53d
commit
719c6c9ae9
@ -454,7 +454,8 @@ Command line options:
|
||||
--test-unit Run unit tests.
|
||||
--test-index <opt_filter_path>
|
||||
Run index tests. opt_filter_path can be used to specify which
|
||||
test to run. If not provided all tests are run.
|
||||
test to run (ie, "foo" will run all tests which contain "foo"
|
||||
in the path). If not provided all tests are run.
|
||||
--log-stdin-stdout-to-stderr
|
||||
Print stdin and stdout messages to stderr. This is a aid for
|
||||
developing new language clients, as it makes it easier to figure
|
||||
|
@ -132,10 +132,12 @@ void RunIndexTests(const std::string& filter_path) {
|
||||
continue;
|
||||
}
|
||||
|
||||
{
|
||||
if (!EndsWith(path, filter_path))
|
||||
if (path.find(filter_path) == std::string::npos)
|
||||
continue;
|
||||
|
||||
if (!filter_path.empty())
|
||||
std::cout << "Running " << path << std::endl;
|
||||
|
||||
// Parse expected output from the test, parse it into JSON document.
|
||||
std::vector<std::string> lines_with_endings = ReadLinesWithEnding(path);
|
||||
TextReplacer text_replacer;
|
||||
@ -245,7 +247,6 @@ void RunIndexTests(const std::string& filter_path) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: ctor/dtor, copy ctor
|
||||
|
Loading…
Reference in New Issue
Block a user