Renamed a keyword argument.

pull/15/head
Jussi Pakkanen 12 years ago
parent 0f60793b15
commit 8d6a681b23
  1. 12
      interpreter.py
  2. 2
      test cases/30 pipeline/meson.build

@ -66,15 +66,15 @@ class Generator(InterpreterObject):
raise InvalidArguments('A non-string object in "arguments" keyword argument.')
self.arglist = args
if 'name_rule' not in kwargs:
raise InvalidArguments('Generator must have "name_rule" keyword argument.')
rule = kwargs['name_rule']
if 'output_name' not in kwargs:
raise InvalidArguments('Generator must have "output_name" keyword argument.')
rule = kwargs['output_name']
if not isinstance(rule, str):
raise InvalidArguments('"name_rule" keyword argument must be a string.')
raise InvalidArguments('"output_name" keyword argument must be a string.')
if not '@BASENAME@' in rule:
raise InvalidArguments('"name_rule" must contain @BASENAME@.')
raise InvalidArguments('"output_name" must contain @BASENAME@.')
if '/' in rule:
raise InvalidArguments('"name_rule" must not contain a slash.')
raise InvalidArguments('"output_name" must not contain a slash.')
self.name_rule = rule
def get_base_outname(self, inname):

@ -3,7 +3,7 @@ project('pipeline test', 'c')
e1 = executable('srcgen', 'srcgen.c')
gen = generator(e1, \
name_rule : '@BASENAME@.c', \
output_name : '@BASENAME@.c', \
arguments : ['@INPUT@', '@OUTPUT@'])
generated = gen.process('input_src.dat')

Loading…
Cancel
Save