Skip to content

Commit

Permalink
Fix array type name
Browse files Browse the repository at this point in the history
c9351ce introduced the type as `array`,
so mintro should expose it under the same name.

(while at it, rename test 169 to be coherent)
  • Loading branch information
1ace authored and jpakkane committed Dec 7, 2017
1 parent 5992ab1 commit 3d63f21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mesonbuild/mintro.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def add_keys(optlist, options):
optdict['choices'] = opt.choices
typestr = 'combo'
elif isinstance(opt, coredata.UserArrayOption):
typestr = 'stringarray'
typestr = 'array'
else:
raise RuntimeError("Unknown option type")
optdict['type'] = typestr
Expand Down
4 changes: 2 additions & 2 deletions run_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ def get_opt():
expected = {
'name': 'list',
'description': 'list',
'type': 'stringarray',
'type': 'array',
'value': ['foo', 'bar'],
}
tdir = os.path.join(self.unit_test_dir, '18 array option')
Expand All @@ -1612,7 +1612,7 @@ def get_opt():
expected = {
'name': 'list',
'description': 'list',
'type': 'stringarray',
'type': 'array',
'value': ['foo', 'bar'],
}
tdir = os.path.join(self.unit_test_dir, '18 array option')
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/169 array option/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

project('stringarray default options')
project('array default options')

assert(get_option('array') == ['foo', 'bar'], 'Default value for array is not equal to choices')

0 comments on commit 3d63f21

Please sign in to comment.