diff options
author | Roel Spilker <r.spilker@gmail.com> | 2020-01-18 01:58:38 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-01-20 14:12:03 +0100 |
commit | 0e583c0122d18285b858ec8cecc2e91a4f4feda0 (patch) | |
tree | d4d133231963f08f48f43621cad61e7dab7ce50b /test/configuration/src/lombok | |
parent | df4501a648f32111c6ee3ace1c826b3d3eef55a1 (diff) | |
download | lombok-0e583c0122d18285b858ec8cecc2e91a4f4feda0.tar.gz lombok-0e583c0122d18285b858ec8cecc2e91a4f4feda0.tar.bz2 lombok-0e583c0122d18285b858ec8cecc2e91a4f4feda0.zip |
Config import: add support for environment variables
Diffstat (limited to 'test/configuration/src/lombok')
-rw-r--r-- | test/configuration/src/lombok/core/configuration/TestConfiguration.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/configuration/src/lombok/core/configuration/TestConfiguration.java b/test/configuration/src/lombok/core/configuration/TestConfiguration.java index 22e3cfe6..3032daf3 100644 --- a/test/configuration/src/lombok/core/configuration/TestConfiguration.java +++ b/test/configuration/src/lombok/core/configuration/TestConfiguration.java @@ -52,7 +52,15 @@ public class TestConfiguration { PrintStream outStream = new PrintStream(rawOut); PrintStream errStream = new PrintStream(rawErr); - int result = new ConfigurationApp().redirectOutput(outStream, errStream).display(keys, true, paths, true, false); + ConfigurationFile.setEnvironment("env", normalizedName + "/e1"); + String userHome = System.getProperty("user.home"); + int result = -1; + try { + System.setProperty("user.home", normalizedName + "/home"); + result = new ConfigurationApp().redirectOutput(outStream, errStream).display(keys, true, paths, true, false); + } finally { + System.setProperty("user.home", userHome); + } outStream.flush(); errStream.flush(); |