diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-10-29 20:46:18 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-10-29 20:46:18 +0100 |
commit | d8b882cf7e7078a7946e04eceba4ce18937a28f0 (patch) | |
tree | eabba31d3120eca402cdc20f21d201f5862ea646 /test | |
parent | e40eab2e343b4c3a7eedf9493aa2a656ec299f69 (diff) | |
download | lombok-d8b882cf7e7078a7946e04eceba4ce18937a28f0.tar.gz lombok-d8b882cf7e7078a7946e04eceba4ce18937a28f0.tar.bz2 lombok-d8b882cf7e7078a7946e04eceba4ce18937a28f0.zip |
[test] Added some posix scripts to test module-based builds. We should make these as unit tests someday.
Diffstat (limited to 'test')
7 files changed, 36 insertions, 0 deletions
diff --git a/test/manual/about.txt b/test/manual/about.txt new file mode 100644 index 00000000..280f491a --- /dev/null +++ b/test/manual/about.txt @@ -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. diff --git a/test/manual/moduleBasedMultiProject/.gitignore b/test/manual/moduleBasedMultiProject/.gitignore new file mode 100644 index 00000000..e2e7327c --- /dev/null +++ b/test/manual/moduleBasedMultiProject/.gitignore @@ -0,0 +1 @@ +/out diff --git a/test/manual/moduleBasedMultiProject/projA/module-info.java b/test/manual/moduleBasedMultiProject/projA/module-info.java new file mode 100644 index 00000000..1ae75d49 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projA/module-info.java @@ -0,0 +1,4 @@ +module projA { + requires static lombok; + exports pkgA; +} diff --git a/test/manual/moduleBasedMultiProject/projA/pkgA/ClassA.java b/test/manual/moduleBasedMultiProject/projA/pkgA/ClassA.java new file mode 100644 index 00000000..2e17e142 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projA/pkgA/ClassA.java @@ -0,0 +1,5 @@ +package pkgA; + +public class ClassA { + @lombok.Getter private String hello = "hello"; +} diff --git a/test/manual/moduleBasedMultiProject/projB/module-info.java b/test/manual/moduleBasedMultiProject/projB/module-info.java new file mode 100644 index 00000000..7b82f362 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projB/module-info.java @@ -0,0 +1,5 @@ +module projB { + requires static lombok; + requires projA; +} + diff --git a/test/manual/moduleBasedMultiProject/projB/pkgB/ClassB.java b/test/manual/moduleBasedMultiProject/projB/pkgB/ClassB.java new file mode 100644 index 00000000..3f57f31e --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projB/pkgB/ClassB.java @@ -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(); + } +} diff --git a/test/manual/moduleBasedMultiProject/runTests b/test/manual/moduleBasedMultiProject/runTests new file mode 100755 index 00000000..48557b43 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/runTests @@ -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 |