diff --git a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java index a50e17adcc5..2091f85645a 100644 --- a/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java +++ b/lucene/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java @@ -1307,7 +1307,7 @@ public abstract class LuceneTestCase extends Assert { if (TEST_NIGHTLY) sb.append(" -Dtests.nightly=true"); // TODO we can't randomize this yet (it drives ant crazy) but this makes tests reproduceable // in case machines have different default charsets... - sb.append(" -Dfile.encoding=" + System.getProperty("file.encoding")); + sb.append(" -Dargs=\"-Dfile.encoding=" + System.getProperty("file.encoding") + "\""); return sb.toString(); }