summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorAndrew McNulty <amcn@users.noreply.github.com>2025-04-09 18:13:39 +0200
committerGitHub <noreply@github.com>2025-04-09 09:13:39 -0700
commitf23b0e7f35661645b7fec82025e72dffa189ab59 (patch)
tree24725595e179c525e71acd2cc662c23084c365f2 /test cases
parent1afdac1bc4cbf9816e7109bbedef2825c4fe1155 (diff)
downloadmeson-f23b0e7f35661645b7fec82025e72dffa189ab59.tar.gz
interpreter: Error if java sources used with non-jar target (#14424)
If the user specifies java sources as input to a non-jar build target, raise an error with a message directing them to use the jar target instead. Fixes: https://github.com/mesonbuild/meson/issues/13870
Diffstat (limited to 'test cases')
-rw-r--r--test cases/failing/134 java sources in non jar target/Test.java0
-rw-r--r--test cases/failing/134 java sources in non jar target/meson.build3
-rw-r--r--test cases/failing/134 java sources in non jar target/test.json7
3 files changed, 10 insertions, 0 deletions
diff --git a/test cases/failing/134 java sources in non jar target/Test.java b/test cases/failing/134 java sources in non jar target/Test.java
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test cases/failing/134 java sources in non jar target/Test.java
diff --git a/test cases/failing/134 java sources in non jar target/meson.build b/test cases/failing/134 java sources in non jar target/meson.build
new file mode 100644
index 000000000..0aa802a48
--- /dev/null
+++ b/test cases/failing/134 java sources in non jar target/meson.build
@@ -0,0 +1,3 @@
+# https://github.com/mesonbuild/meson/issues/13870
+project('134 java sources in non jar target')
+executable('Test.jar', 'Test.java')
diff --git a/test cases/failing/134 java sources in non jar target/test.json b/test cases/failing/134 java sources in non jar target/test.json
new file mode 100644
index 000000000..271ac36af
--- /dev/null
+++ b/test cases/failing/134 java sources in non jar target/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/134 java sources in non jar target/meson.build:3:0: ERROR: Build target of type \"executable\" cannot build java source: \"Test.java\". Use \"jar\" instead."
+ }
+ ]
+}