aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/rust/1 basic
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/rust/1 basic')
-rw-r--r--meson/test cases/rust/1 basic/meson.build9
-rw-r--r--meson/test cases/rust/1 basic/prog.rs3
-rw-r--r--meson/test cases/rust/1 basic/subdir/meson.build2
-rw-r--r--meson/test cases/rust/1 basic/subdir/prog.rs3
-rw-r--r--meson/test cases/rust/1 basic/test.json8
5 files changed, 25 insertions, 0 deletions
diff --git a/meson/test cases/rust/1 basic/meson.build b/meson/test cases/rust/1 basic/meson.build
new file mode 100644
index 000000000..3919279a9
--- /dev/null
+++ b/meson/test cases/rust/1 basic/meson.build
@@ -0,0 +1,9 @@
+project('rustprog', 'rust')
+
+e = executable('program', 'prog.rs',
+ rust_args : ['-C', 'lto'], # Just a test
+ install : true
+)
+test('rusttest', e)
+
+subdir('subdir')
diff --git a/meson/test cases/rust/1 basic/prog.rs b/meson/test cases/rust/1 basic/prog.rs
new file mode 100644
index 000000000..b171a80c2
--- /dev/null
+++ b/meson/test cases/rust/1 basic/prog.rs
@@ -0,0 +1,3 @@
+fn main() {
+ println!("rust compiler is working");
+}
diff --git a/meson/test cases/rust/1 basic/subdir/meson.build b/meson/test cases/rust/1 basic/subdir/meson.build
new file mode 100644
index 000000000..51b385b40
--- /dev/null
+++ b/meson/test cases/rust/1 basic/subdir/meson.build
@@ -0,0 +1,2 @@
+e = executable('program2', 'prog.rs', install : true)
+test('rusttest2', e)
diff --git a/meson/test cases/rust/1 basic/subdir/prog.rs b/meson/test cases/rust/1 basic/subdir/prog.rs
new file mode 100644
index 000000000..b171a80c2
--- /dev/null
+++ b/meson/test cases/rust/1 basic/subdir/prog.rs
@@ -0,0 +1,3 @@
+fn main() {
+ println!("rust compiler is working");
+}
diff --git a/meson/test cases/rust/1 basic/test.json b/meson/test cases/rust/1 basic/test.json
new file mode 100644
index 000000000..94c995b3f
--- /dev/null
+++ b/meson/test cases/rust/1 basic/test.json
@@ -0,0 +1,8 @@
+{
+ "installed": [
+ {"type": "exe", "file": "usr/bin/program"},
+ {"type": "pdb", "file": "usr/bin/program"},
+ {"type": "exe", "file": "usr/bin/program2"},
+ {"type": "pdb", "file": "usr/bin/program2"}
+ ]
+}