diff options
Diffstat (limited to 'test/configuration')
7 files changed, 31 insertions, 8 deletions
diff --git a/test/configuration/resource/configurationRoot/d1/d11/d111/directory/lombok.config b/test/configuration/resource/configurationRoot/d1/d11/d111/directory/lombok.config new file mode 100644 index 00000000..bc262c59 --- /dev/null +++ b/test/configuration/resource/configurationRoot/d1/d11/d111/directory/lombok.config @@ -0,0 +1 @@ +lombok.accessors.prefix += x_
\ No newline at end of file diff --git a/test/configuration/resource/configurationRoot/d1/d11/d111/import1.config b/test/configuration/resource/configurationRoot/d1/d11/d111/import1.config index e94bd991..02e6cfae 100644 --- a/test/configuration/resource/configurationRoot/d1/d11/d111/import1.config +++ b/test/configuration/resource/configurationRoot/d1/d11/d111/import1.config @@ -1,6 +1,9 @@ -import missing
-import import1.config
-import ../d111/import1.config
-import ../../../archives/a1.jar
-lombok.accessors.prefix += z_
+import missing +import import1.config +import ../d111/import1.config +import ../../../archives/a1.jar +import directory +import <env>/environment.config +import ~/home.config +lombok.accessors.prefix += z_ lombok.accessors.prefix += f
\ No newline at end of file diff --git a/test/configuration/resource/configurationRoot/e1/environment.config b/test/configuration/resource/configurationRoot/e1/environment.config new file mode 100644 index 00000000..1436021c --- /dev/null +++ b/test/configuration/resource/configurationRoot/e1/environment.config @@ -0,0 +1 @@ +lombok.accessors.prefix += e_
\ No newline at end of file diff --git a/test/configuration/resource/configurationRoot/err.txt b/test/configuration/resource/configurationRoot/err.txt index c17a6dea..4505dced 100644 --- a/test/configuration/resource/configurationRoot/err.txt +++ b/test/configuration/resource/configurationRoot/err.txt @@ -1,4 +1,5 @@ Problems in the configuration files: - Imported file does not exist: import missing (BASE/d1/d11/d111/import1.config:1) +- Imported file does not exist: import directory (BASE/d1/d11/d111/import1.config:5) - Import is not valid: import /illegal (BASE/archives/a1.jar!lombok.config:2) - Imported file does not exist: import nonexisting (BASE/archives/a1.jar!d1/include.config:2)
\ No newline at end of file diff --git a/test/configuration/resource/configurationRoot/home/home.config b/test/configuration/resource/configurationRoot/home/home.config new file mode 100644 index 00000000..4a190b56 --- /dev/null +++ b/test/configuration/resource/configurationRoot/home/home.config @@ -0,0 +1 @@ +lombok.accessors.prefix += h_
\ No newline at end of file diff --git a/test/configuration/resource/configurationRoot/out.txt b/test/configuration/resource/configurationRoot/out.txt index 19dc1e2d..bcb468c2 100644 --- a/test/configuration/resource/configurationRoot/out.txt +++ b/test/configuration/resource/configurationRoot/out.txt @@ -51,15 +51,23 @@ clear lombok.accessors.chain # 3: clear lombok.accessors.chain # Strip this field prefix, like 'f' or 'm_', from the names of generated getters and setters. +lombok.accessors.prefix += e_ +lombok.accessors.prefix += h_ lombok.accessors.prefix += z_ lombok.accessors.prefix += f lombok.accessors.prefix += m_ # BASE/d1/d11/lombok.config (stopped bubbling): # 5: lombok.accessors.prefix += f # +# BASE/e1/environment.config (imported from BASE/d1/d11/d111/import1.config:6): +# 1: lombok.accessors.prefix += e_ +# +# BASE/home/home.config (imported from BASE/d1/d11/d111/import1.config:7): +# 1: lombok.accessors.prefix += h_ +# # BASE/d1/d11/d111/import1.config (imported from BASE/d1/d11/d111/lombok.config:1): -# 5: lombok.accessors.prefix += z_ -# 6: lombok.accessors.prefix += f +# 8: lombok.accessors.prefix += z_ +# 9: lombok.accessors.prefix += f # # BASE/d1/d11/d111/lombok.config: # 4: lombok.accessors.prefix += m_ 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(); |