mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 20:15:09 +00:00
[test] Added some posix scripts to test module-based builds. We should make these as unit tests someday.
This commit is contained in:
1 parent
e40eab2e34
commit
d8b882cf7e
7 files changed
+36
No files matched your search
@@ -0,0 +1 @@
|
||||
This directory contains test cases which must be manually run. The aim is to get these automated as unit tests, but, walk before you can run.
|
||||
@@ -0,0 +1 @@
|
||||
/out
|
||||
@@ -0,0 +1,4 @@
|
||||
module projA {
|
||||
requires static lombok;
|
||||
exports pkgA;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package pkgA;
|
||||
|
||||
public class ClassA {
|
||||
@lombok.Getter private String hello = "hello";
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module projB {
|
||||
requires static lombok;
|
||||
requires projA;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import lombok.Getter;
|
||||
import pkgA.ClassA;
|
||||
|
||||
public class ClassB {
|
||||
@Getter private String world = "world";
|
||||
public void test() {
|
||||
new ClassA().getHello();
|
||||
getWorld();
|
||||
}
|
||||
}
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
echo 'This will build, module-style, 2 modules with lombok dependencies. If the compilation works without error or warning, lombok is working as designed.'
|
||||
mkdir -p out/projA
|
||||
mkdir -p out/projB
|
||||
javac --processor-path ../../../dist/lombok.jar -p ../../../dist/lombok.jar -d out/projA projA/module-info.java projA/pkgA/ClassA.java
|
||||
javac --processor-path ../../../dist/lombok.jar -p ../../../dist/lombok.jar:out/projA -d out/projB projB/module-info.java projB/pkgB/ClassB.java
|
||||
|
||||
echo Now we try to delombok and see if it works as designed.
|
||||
|
||||
java -jar ../../../dist/lombok.jar delombok -p --module-path out/projA projB/pkgB/ClassB.java projB/module-info.java
|
||||
Reference in new issue
Block a user