summaryrefslogtreecommitdiff
path: root/test cases/unit
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-07-15 14:10:31 +0200
committerXavier Claessens <xclaesse@gmail.com>2023-03-16 17:18:30 -0400
commitadb619db6110d14e8f56366dbc2ce271abc4558c (patch)
tree6be4f4c5658b5d3b53713e9bace0ff82f418e044 /test cases/unit
parente0792f48197ff03dab4692e22bd2b13552c53823 (diff)
downloadmeson-adb619db6110d14e8f56366dbc2ce271abc4558c.tar.gz
Stop using replace_if_different() for coredata pickle file
This was added in f774609 to only change the access time of the coredata file if the coredata struct actually changed. However, this doesn't work as pickle serializations aren't guaranteed to be stable. Instead, let's manually check if options have changed values and skip the save if they haven't changed. We also extend the associated unit test to cover all the option types and to ensure that configure does get executed if one of the options changes value.
Diffstat (limited to 'test cases/unit')
-rw-r--r--test cases/unit/108 configure same noop/meson_options.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/test cases/unit/108 configure same noop/meson_options.txt b/test cases/unit/108 configure same noop/meson_options.txt
index c406af229..57b40844c 100644
--- a/test cases/unit/108 configure same noop/meson_options.txt
+++ b/test cases/unit/108 configure same noop/meson_options.txt
@@ -1,5 +1,6 @@
-option(
- 'opt',
- type : 'string',
- value: '',
-)
+option('string', type : 'string', value: '')
+option('boolean', type : 'boolean', value: false)
+option('combo', type : 'combo', choices : ['one', 'two', 'three'], value: 'one')
+option('integer', type : 'integer', value: 5)
+option('array', type : 'array', value: ['one', 'two'])
+option('feature', type : 'feature', value : 'enabled')