Example #1
0
 def test_configure_ac_line_pkg_check_exists(self):
     """
     Test configure_ac_line for the PKG_CHECK_EXISTS macro
     """
     buildreq.configure_ac_line('PKG_CHECK_EXISTS([module1 > 1 module2], '
                                'action-if-found, '
                                'action-if-not-found)')
     self.assertEqual(buildreq.buildreqs,
                      set(['pkgconfig(module1)', 'pkgconfig(module2)']))
Example #2
0
 def test_configure_ac_line_xdt_check_package(self):
     """
     Test configure_ac_line for the XFCE version of PKG_CHECK_MODULES
     """
     buildreq.configure_ac_line('XDT_CHECK_PACKAGE(prefix, '
                                '[module = 2 module2 > 9], '
                                'action-if-found, action-if-not-found)')
     self.assertEqual(buildreq.buildreqs,
                      set(['pkgconfig(module)', 'pkgconfig(module2)']))
Example #3
0
 def test_configure_ac_line_pkg_check_modules(self):
     """
     Test the somewhat complicated logic of configure_ac_line check for the
     PKG_CHECK_MODULES\((.*?)\) line.
     """
     buildreq.configure_ac_line('PKG_CHECK_MODULES(prefix, '
                                '[module > 2 module2 < 2], '
                                'action-if-found, action-if-not-found)')
     self.assertEqual(buildreq.buildreqs,
                      set(['pkgconfig(module)', 'pkgconfig(module2)']))
Example #4
0
 def test_configure_ac_line_comment(self):
     """
     Test configure_ac_line with commented line
     """
     buildreq.configure_ac_line('# AC_CHECK_FUNC\([tgetent])')
     self.assertEqual(buildreq.buildreqs, set())
Example #5
0
 def test_configure_ac_line(self):
     """
     Test configure_ac_line with standard pattern
     """
     buildreq.configure_ac_line('AC_CHECK_FUNC\([tgetent])')
     self.assertIn('ncurses-devel', buildreq.buildreqs)