[test] Made it easier to run the tests on just one of the resource files.

This commit is contained in:
Reinier Zwitserloot committed 2019-01-29 01:34:22 +01:00
1 parent 3d0beec38d
commit 984570df78
1 file changed
+6 -3
+6 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2015 The Project Lombok Authors.
* Copyright (C) 2009-2019 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -36,6 +36,8 @@ import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunNotifier;
public class DirectoryRunner extends Runner {
private static final String DEBUG_FOCUS_ON_FILE = null;
public enum Compiler {
DELOMBOK {
@Override public int getVersion() {
@@ -73,10 +75,11 @@ public class DirectoryRunner extends Runner {
public abstract boolean expectChanges();
}
private static final FileFilter JAVA_FILE_FILTER = new FileFilter() {
@Override public boolean accept(File file) {
return file.isFile() && file.getName().endsWith(".java");
return file.isFile() && file.getName().endsWith(".java") &&
(DEBUG_FOCUS_ON_FILE == null || file.getName().equals(DEBUG_FOCUS_ON_FILE));
}
};