diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-07-10 02:50:38 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-07-10 02:57:45 +0200 |
commit | 1fd2401bade3db3bb3a1bd88727823776f39be0c (patch) | |
tree | 7dae9f71ce118dae54485cdf175fe51af39eb134 /test/core/src/lombok/DirectoryRunner.java | |
parent | 32e7cd18571200c41736e70daa4815893e9ea8c3 (diff) | |
download | lombok-1fd2401bade3db3bb3a1bd88727823776f39be0c.tar.gz lombok-1fd2401bade3db3bb3a1bd88727823776f39be0c.tar.bz2 lombok-1fd2401bade3db3bb3a1bd88727823776f39be0c.zip |
[test] more flexible options for limiting your tests.
Diffstat (limited to 'test/core/src/lombok/DirectoryRunner.java')
-rw-r--r-- | test/core/src/lombok/DirectoryRunner.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/core/src/lombok/DirectoryRunner.java b/test/core/src/lombok/DirectoryRunner.java index e4792ca9..a174355d 100644 --- a/test/core/src/lombok/DirectoryRunner.java +++ b/test/core/src/lombok/DirectoryRunner.java @@ -47,7 +47,7 @@ public class DirectoryRunner extends Runner { @Override public int getVersion() { return Javac.getJavaCompilerVersion(); } - }, + }, JAVAC { @Override public int getVersion() { return DELOMBOK.getVersion(); @@ -85,11 +85,17 @@ public class DirectoryRunner extends Runner { if (!file.isFile() || !file.getName().endsWith(".java")) return false; boolean positiveFilter = false; for (String dfof : DEBUG_FOCUS_ON_FILE) { + if (dfof.isEmpty()) continue; if (!dfof.endsWith(".java")) dfof = dfof + ".java"; boolean invert = dfof.startsWith("!"); if (invert) dfof = dfof.substring(1); positiveFilter = positiveFilter || !invert; - if (file.getName().equals(dfof)) return !invert; + int starIdx = dfof.indexOf('*'); + if (starIdx == -1) { + if (file.getName().equals(dfof)) return !invert; + } else { + if (file.getName().startsWith(dfof.substring(0, starIdx)) && file.getName().endsWith(dfof.substring(starIdx + 1))) return !invert; + } } return !positiveFilter; } |