aboutsummaryrefslogtreecommitdiff
path: root/test cases/frameworks
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-08-09 10:38:14 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-08-09 19:43:45 -0400
commit223991c09e9c568f0e45f6c5c1918122af7d2776 (patch)
tree6f4043a508cb4e3c49f1bdddbad21098ba26a57d /test cases/frameworks
parent487d45c1e5bfff0fbdb4747841db6a0b5b124af9 (diff)
downloadmeson-223991c09e9c568f0e45f6c5c1918122af7d2776.zip
meson-223991c09e9c568f0e45f6c5c1918122af7d2776.tar.gz
meson-223991c09e9c568f0e45f6c5c1918122af7d2776.tar.bz2
Fix i18n target name when using @BASENAME@ and configure_file() input
Fixes: #9022
Diffstat (limited to 'test cases/frameworks')
-rw-r--r--test cases/frameworks/6 gettext/data/meson.build28
-rw-r--r--test cases/frameworks/6 gettext/data/test5.desktop.in.in6
-rw-r--r--test cases/frameworks/6 gettext/data/test6.desktop.in.in6
-rw-r--r--test cases/frameworks/6 gettext/test.json4
4 files changed, 43 insertions, 1 deletions
diff --git a/test cases/frameworks/6 gettext/data/meson.build b/test cases/frameworks/6 gettext/data/meson.build
index d78c19e..1afb403 100644
--- a/test cases/frameworks/6 gettext/data/meson.build
+++ b/test cases/frameworks/6 gettext/data/meson.build
@@ -27,4 +27,32 @@ i18n.merge_file(
install_dir: join_paths(get_option('datadir'), 'applications')
)
+# Regression test when passing File object as input and '@BASENAME@' as output
+# in multiple i18n.merge_file() calls. It used to make target name collision.
+# https://github.com/mesonbuild/meson/issues/9022
+i18n.merge_file(
+ input: configure_file(
+ input: 'test5.desktop.in.in',
+ output: '@BASENAME@',
+ configuration: { 'NAME': 'Application' },
+ ),
+ output: '@BASENAME@',
+ type: 'desktop',
+ po_dir: '../po',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications')
+)
+i18n.merge_file(
+ input: configure_file(
+ input: 'test6.desktop.in.in',
+ output: '@BASENAME@',
+ configuration: { 'NAME': 'Application' },
+ ),
+ output: '@BASENAME@',
+ type: 'desktop',
+ po_dir: '../po',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications')
+)
+
subdir('data3')
diff --git a/test cases/frameworks/6 gettext/data/test5.desktop.in.in b/test cases/frameworks/6 gettext/data/test5.desktop.in.in
new file mode 100644
index 0000000..c75bf73
--- /dev/null
+++ b/test cases/frameworks/6 gettext/data/test5.desktop.in.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Test 2
+GenericName=@NAME@
+Comment=Test Application
+Type=Application
+
diff --git a/test cases/frameworks/6 gettext/data/test6.desktop.in.in b/test cases/frameworks/6 gettext/data/test6.desktop.in.in
new file mode 100644
index 0000000..c75bf73
--- /dev/null
+++ b/test cases/frameworks/6 gettext/data/test6.desktop.in.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Test 2
+GenericName=@NAME@
+Comment=Test Application
+Type=Application
+
diff --git a/test cases/frameworks/6 gettext/test.json b/test cases/frameworks/6 gettext/test.json
index 12ce27a..df97430 100644
--- a/test cases/frameworks/6 gettext/test.json
+++ b/test cases/frameworks/6 gettext/test.json
@@ -9,7 +9,9 @@
{"type": "file", "file": "usr/share/applications/test.plugin"},
{"type": "file", "file": "usr/share/applications/test2.desktop"},
{"type": "file", "file": "usr/share/applications/test3.desktop"},
- {"type": "file", "file": "usr/share/applications/test4.desktop"}
+ {"type": "file", "file": "usr/share/applications/test4.desktop"},
+ {"type": "file", "file": "usr/share/applications/test5.desktop"},
+ {"type": "file", "file": "usr/share/applications/test6.desktop"}
],
"matrix": {
"options": {