summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/7 gnome/resources-data
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/frameworks/7 gnome/resources-data')
-rw-r--r--test cases/frameworks/7 gnome/resources-data/meson.build18
-rw-r--r--test cases/frameworks/7 gnome/resources-data/res1.txt1
-rw-r--r--test cases/frameworks/7 gnome/resources-data/res3.txt.in1
-rw-r--r--test cases/frameworks/7 gnome/resources-data/subdir/meson.build8
-rw-r--r--test cases/frameworks/7 gnome/resources-data/subdir/res2.txt1
-rw-r--r--test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in1
6 files changed, 30 insertions, 0 deletions
diff --git a/test cases/frameworks/7 gnome/resources-data/meson.build b/test cases/frameworks/7 gnome/resources-data/meson.build
new file mode 100644
index 0000000..31a577b
--- /dev/null
+++ b/test cases/frameworks/7 gnome/resources-data/meson.build
@@ -0,0 +1,18 @@
+subdir('subdir')
+
+python3 = import('python3').find_python()
+
+fake_generator_script = '''
+import os, sys
+assert os.path.exists(sys.argv[1]), "File %s not found" % sys.argv[1]
+print("This is a generated resource.")
+'''
+
+# Generate file res3.txt from file res3.txt.in. This is then included
+# in a GResource file, driven by resources/meson.build.
+res3_txt = custom_target('res3',
+ input: 'res3.txt.in',
+ output: 'res3.txt',
+ command: [python3, '-c', fake_generator_script, '@INPUT@'],
+ capture: true,
+)
diff --git a/test cases/frameworks/7 gnome/resources-data/res1.txt b/test cases/frameworks/7 gnome/resources-data/res1.txt
new file mode 100644
index 0000000..e10afea
--- /dev/null
+++ b/test cases/frameworks/7 gnome/resources-data/res1.txt
@@ -0,0 +1 @@
+This is a resource.
diff --git a/test cases/frameworks/7 gnome/resources-data/res3.txt.in b/test cases/frameworks/7 gnome/resources-data/res3.txt.in
new file mode 100644
index 0000000..077a8e3
--- /dev/null
+++ b/test cases/frameworks/7 gnome/resources-data/res3.txt.in
@@ -0,0 +1 @@
+This content is ignored, but Meson doesn't need to know that.
diff --git a/test cases/frameworks/7 gnome/resources-data/subdir/meson.build b/test cases/frameworks/7 gnome/resources-data/subdir/meson.build
new file mode 100644
index 0000000..b41300f
--- /dev/null
+++ b/test cases/frameworks/7 gnome/resources-data/subdir/meson.build
@@ -0,0 +1,8 @@
+cdata = configuration_data()
+cdata.set('NOISE', 'BARK')
+
+res4_txt = configure_file(
+ input: 'res4.txt.in',
+ output: 'res4.txt',
+ configuration: cdata
+)
diff --git a/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt b/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt
new file mode 100644
index 0000000..d297899
--- /dev/null
+++ b/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt
@@ -0,0 +1 @@
+This is a resource in a subdirectory.
diff --git a/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in b/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in
new file mode 100644
index 0000000..c0ec6f2
--- /dev/null
+++ b/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in
@@ -0,0 +1 @@
+@NOISE@ @NOISE@ @NOISE@