interpreter: man sections can be up to 9 on many platforms

Linux and FreeBSD use section 9 for kernel man pages, so we should allow
that.
pull/8884/head
Dylan Baker 4 years ago
parent 9611bd8244
commit 7619f31f71
  1. 7
      mesonbuild/interpreter/interpreter.py
  2. 2
      test cases/failing/30 invalid man extension/test.json
  3. 2
      test cases/failing/31 no man extension/test.json

@ -1915,11 +1915,12 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
sources = self.source_strings_to_files(args[0])
for s in sources:
try:
num = int(s.split('.')[-1])
num = int(s.rsplit('.', 1)[-1])
except (IndexError, ValueError):
num = 0
if num < 1 or num > 8:
raise InvalidArguments('Man file must have a file extension of a number between 1 and 8')
if not 1 <= num <= 9:
raise InvalidArguments('Man file must have a file extension of a number between 1 and 9')
custom_install_mode = self._get_kwarg_install_mode(kwargs)
custom_install_dir = kwargs.get('install_dir', None)
locale = kwargs.get('locale')

@ -1,7 +1,7 @@
{
"stdout": [
{
"line": "test cases/failing/30 invalid man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 8"
"line": "test cases/failing/30 invalid man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 9"
}
]
}

@ -1,7 +1,7 @@
{
"stdout": [
{
"line": "test cases/failing/31 no man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 8"
"line": "test cases/failing/31 no man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 9"
}
]
}

Loading…
Cancel
Save