diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/keyval/1 basic | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/keyval/1 basic')
-rw-r--r-- | meson/test cases/keyval/1 basic/.config | 3 | ||||
-rw-r--r-- | meson/test cases/keyval/1 basic/meson.build | 18 | ||||
-rw-r--r-- | meson/test cases/keyval/1 basic/test.json | 7 |
3 files changed, 28 insertions, 0 deletions
diff --git a/meson/test cases/keyval/1 basic/.config b/meson/test cases/keyval/1 basic/.config new file mode 100644 index 000000000..071d1854d --- /dev/null +++ b/meson/test cases/keyval/1 basic/.config @@ -0,0 +1,3 @@ +CONFIG_VAL1=y +# CONFIG_VAL2 is not set +CONFIG_VAL_VAL=4 diff --git a/meson/test cases/keyval/1 basic/meson.build b/meson/test cases/keyval/1 basic/meson.build new file mode 100644 index 000000000..4207b8e2d --- /dev/null +++ b/meson/test cases/keyval/1 basic/meson.build @@ -0,0 +1,18 @@ +project('keyval basic test') + +k = import('keyval') +conf = k.load('.config') + +if not conf.has_key('CONFIG_VAL1') + error('Expected CONFIG_VAL1 to be set, but it wasn\'t') +endif + +if conf.has_key('CONFIG_VAL2') + error('Expected CONFIG_VAL2 not be set, but it was') +endif + +if conf.get('CONFIG_VAL_VAL').to_int() != 4 + error('Expected CONFIG_VAL_VAL to be 4') +endif + +k = import('unstable-keyval') diff --git a/meson/test cases/keyval/1 basic/test.json b/meson/test cases/keyval/1 basic/test.json new file mode 100644 index 000000000..dbdc5af41 --- /dev/null +++ b/meson/test cases/keyval/1 basic/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "WARNING: Module unstable-keyval is now stable, please use the keyval module instead." + } + ] +} |