@@ -174,6 +174,12 @@ def prepare_test(self):
174174 print ('DOCBOOK_OUTPUT=%s/docbook' % self .test_out , file = f )
175175 else :
176176 print ('GENERATE_DOCBOOK=NO' , file = f )
177+ if (self .args .man ):
178+ print ('GENERATE_MAN=YES' , file = f )
179+ print ('MAN_LINKS=YES' , file = f )
180+ print ('MAN_OUTPUT=%s/man' % self .test_out , file = f )
181+ else :
182+ print ('GENERATE_MAN=NO' , file = f )
177183 if (self .args .qhp ):
178184 print ('GENERATE_QHP=YES' , file = f )
179185 if (self .args .xhtml or self .args .qhp ):
@@ -291,6 +297,7 @@ def perform_test(self,testmgr):
291297 failed_docbook = False
292298 failed_rtf = False
293299 failed_xmlxsd = False
300+ failed_man = False
294301 msg = ()
295302 # look for files to check against the reference
296303 if self .args .xml or self .args .xmlxsd :
@@ -455,6 +462,10 @@ def perform_test(self,testmgr):
455462 elif not self .args .keep :
456463 shutil .rmtree (docbook_output ,ignore_errors = True )
457464
465+ if (self .args .man ):
466+ # For future work
467+ pass
468+
458469 if (self .args .xhtml or self .args .qhp ):
459470 html_output = '%s/html' % self .test_out
460471 if (sys .platform == 'win32' ):
@@ -533,7 +544,7 @@ def perform_test(self,testmgr):
533544 if failed_warn :
534545 msg += (warnings ,)
535546
536- if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd :
547+ if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd or failed_man :
537548 testmgr .ok (False ,self .test_name ,msg )
538549 return False
539550
@@ -659,6 +670,8 @@ def main():
659670 'create qhp output and check with xmllint' ,action = "store_true" )
660671 parser .add_argument ('--xmlxsd' ,help =
661672 'create xml output and check with xmllint against xsd' ,action = "store_true" )
673+ parser .add_argument ('--man' ,help =
674+ 'create man output' ,action = "store_true" )
662675 parser .add_argument ('--pdf' ,help = 'create LaTeX output and create pdf from it' ,
663676 action = "store_true" )
664677 parser .add_argument ('--subdirs' ,help = 'use the configuration parameter CREATE_SUBDIRS=YES' ,
@@ -677,7 +690,7 @@ def main():
677690 args = parser .parse_args (test_flags + sys .argv [1 :])
678691
679692 # sanity check
680- if (not args .xml ) and (not args .pdf ) and (not args .xhtml ) and (not args .qhp ) and (not args .docbook and (not args .rtf ) and (not args .xmlxsd )):
693+ if (not args .xml ) and (not args .pdf ) and (not args .xhtml ) and (not args .qhp ) and (not args .docbook and (not args .rtf ) and (not args .xmlxsd ) and ( not args . man ) ):
681694 args .xml = True
682695 if (args .updateref is not None ) and (args .ids is None ) and (args .all is None ):
683696 parser .error ('--updateref requires either --id or --all' )
0 commit comments