diff options
Diffstat (limited to '')
-rw-r--r-- | test cases/keyval/1 basic/.config | 3 | ||||
-rw-r--r-- | test cases/keyval/1 basic/meson.build | 18 | ||||
-rw-r--r-- | test cases/keyval/1 basic/test.json | 7 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test cases/keyval/1 basic/.config b/test cases/keyval/1 basic/.config new file mode 100644 index 0000000..071d185 --- /dev/null +++ b/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/test cases/keyval/1 basic/meson.build b/test cases/keyval/1 basic/meson.build new file mode 100644 index 0000000..a6e023e --- /dev/null +++ b/test cases/keyval/1 basic/meson.build @@ -0,0 +1,18 @@ +project('keyval basic test', meson_version : '>= 0.55') + +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/test cases/keyval/1 basic/test.json b/test cases/keyval/1 basic/test.json new file mode 100644 index 0000000..1f8fd9b --- /dev/null +++ b/test cases/keyval/1 basic/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/keyval/1 basic/meson.build:3: WARNING: Project targets '>= 0.55' but uses feature introduced in '0.56.0': module keyval as stable module. Consider either adding \"unstable-\" to the module name, or updating the meson required version to \">= 0.56.0\"" + } + ] +} |