aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/rewrite/3 kwargs
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/rewrite/3 kwargs')
-rw-r--r--meson/test cases/rewrite/3 kwargs/add.json38
-rw-r--r--meson/test cases/rewrite/3 kwargs/defopts_delete.json18
-rw-r--r--meson/test cases/rewrite/3 kwargs/defopts_set.json24
-rw-r--r--meson/test cases/rewrite/3 kwargs/delete.json20
-rw-r--r--meson/test cases/rewrite/3 kwargs/info.json20
-rw-r--r--meson/test cases/rewrite/3 kwargs/meson.build7
-rw-r--r--meson/test cases/rewrite/3 kwargs/remove.json38
-rw-r--r--meson/test cases/rewrite/3 kwargs/remove_regex.json29
-rw-r--r--meson/test cases/rewrite/3 kwargs/set.json34
9 files changed, 228 insertions, 0 deletions
diff --git a/meson/test cases/rewrite/3 kwargs/add.json b/meson/test cases/rewrite/3 kwargs/add.json
new file mode 100644
index 000000000..5b3ce0b4d
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/add.json
@@ -0,0 +1,38 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "set",
+ "kwargs": {
+ "license": "GPL"
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "add",
+ "kwargs": {
+ "license": ["MIT"]
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "add",
+ "kwargs": {
+ "license": "BSD"
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "//",
+ "operation": "add",
+ "kwargs": {
+ "license": "Boost"
+ }
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/defopts_delete.json b/meson/test cases/rewrite/3 kwargs/defopts_delete.json
new file mode 100644
index 000000000..4fe39e2a2
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/defopts_delete.json
@@ -0,0 +1,18 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "set",
+ "kwargs": {
+ "default_options": ["cpp_std=c++14", "buildtype=release", "debug=true"]
+ }
+ },
+ {
+ "type": "default_options",
+ "operation": "delete",
+ "options": {
+ "buildtype": null
+ }
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/defopts_set.json b/meson/test cases/rewrite/3 kwargs/defopts_set.json
new file mode 100644
index 000000000..f8f855f11
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/defopts_set.json
@@ -0,0 +1,24 @@
+[
+ {
+ "type": "default_options",
+ "operation": "set",
+ "options": {
+ "cpp_std": "c++14"
+ }
+ },
+ {
+ "type": "default_options",
+ "operation": "set",
+ "options": {
+ "buildtype": "release",
+ "debug": true
+ }
+ },
+ {
+ "type": "default_options",
+ "operation": "set",
+ "options": {
+ "cpp_std": "c++11"
+ }
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/delete.json b/meson/test cases/rewrite/3 kwargs/delete.json
new file mode 100644
index 000000000..7047f4a40
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/delete.json
@@ -0,0 +1,20 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "delete",
+ "kwargs": {
+ "version": null
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "target",
+ "id": "helloWorld",
+ "operation": "delete",
+ "kwargs": {
+ "build_by_default": false
+ }
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/info.json b/meson/test cases/rewrite/3 kwargs/info.json
new file mode 100644
index 000000000..0eed4048e
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/info.json
@@ -0,0 +1,20 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "info"
+ },
+ {
+ "type": "kwargs",
+ "function": "target",
+ "id": "tgt1",
+ "operation": "info"
+ },
+ {
+ "type": "kwargs",
+ "function": "dependency",
+ "id": "dep1",
+ "operation": "info"
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/meson.build b/meson/test cases/rewrite/3 kwargs/meson.build
new file mode 100644
index 000000000..13b336ca4
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/meson.build
@@ -0,0 +1,7 @@
+project('rewritetest', 'cpp', version: '0.0.1')
+
+# Find ZLIB
+dep1 = dependency('zlib', required: false)
+
+# Make a test exe
+tgt1 = executable('helloWorld', 'main.cpp', build_by_default: true)
diff --git a/meson/test cases/rewrite/3 kwargs/remove.json b/meson/test cases/rewrite/3 kwargs/remove.json
new file mode 100644
index 000000000..e33cb6681
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/remove.json
@@ -0,0 +1,38 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "set",
+ "kwargs": {
+ "license": ["GPL", "MIT", "BSD", "Boost"]
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "remove",
+ "kwargs": {
+ "license": ["MIT"]
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "remove",
+ "kwargs": {
+ "license": "BSD"
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "//",
+ "operation": "remove",
+ "kwargs": {
+ "license": "Boost"
+ }
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/remove_regex.json b/meson/test cases/rewrite/3 kwargs/remove_regex.json
new file mode 100644
index 000000000..07fa58e21
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/remove_regex.json
@@ -0,0 +1,29 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "set",
+ "kwargs": {
+ "default_options": ["cpp_std=c++14", "buildtype=release", "debug=true"]
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "/",
+ "operation": "remove_regex",
+ "kwargs": {
+ "default_options": ["cpp_std=.*"]
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "//",
+ "operation": "remove_regex",
+ "kwargs": {
+ "default_options": ["buildtype=.*"]
+ }
+ }
+]
diff --git a/meson/test cases/rewrite/3 kwargs/set.json b/meson/test cases/rewrite/3 kwargs/set.json
new file mode 100644
index 000000000..6ca2ee4ae
--- /dev/null
+++ b/meson/test cases/rewrite/3 kwargs/set.json
@@ -0,0 +1,34 @@
+[
+ {
+ "type": "kwargs",
+ "function": "project",
+ "id": "//",
+ "operation": "set",
+ "kwargs": {
+ "version": "0.0.2",
+ "meson_version": "0.50.0",
+ "license": ["GPL", "MIT"]
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "target",
+ "id": "helloWorld",
+ "operation": "set",
+ "kwargs": {
+ "build_by_default": false,
+ "build_rpath": "/usr/local",
+ "dependencies": "dep1"
+ }
+ },
+ {
+ "type": "kwargs",
+ "function": "dependency",
+ "id": "zlib",
+ "operation": "set",
+ "kwargs": {
+ "required": true,
+ "method": "cmake"
+ }
+ }
+]