Esempio n. 1
0
    def testBuildOutputWithDir(self):
        """Find all the inputs and outputs for a GRD file with an output dir."""
        info_object = buildinfo.DetermineBuildInfo()

        class DummyOpts(object):
            def __init__(self):
                self.input = '../grit/testdata/buildinfo.grd'
                self.print_header = False
                self.verbose = False
                self.extra_verbose = False

        info_object.Run(DummyOpts(), ['-o', '../grit/testdata'])
        output = self.buf.getvalue().replace('\\', '/')
        self.failUnless(
            output.count(r'rc_all|../grit/testdata/sv_sidebar_loading.html'))
        self.failUnless(output.count(r'rc_header|../grit/testdata/resource.h'))
        self.failUnless(
            output.count(r'rc_all|../grit/testdata/en_generated_resources.rc'))
        self.failUnless(
            output.count(r'rc_all|../grit/testdata/sv_generated_resources.rc'))
        self.failUnless(output.count(r'input|../grit/testdata/substitute.xmb'))
        self.failUnlessEqual(
            0, output.count(r'rc_all|../grit/testdata/sv_welcome_toast.html'))
        self.failUnless(
            output.count(r'rc_all|../grit/testdata/en_welcome_toast.html'))
Esempio n. 2
0
  def testBuildOutput(self):
    """Find all of the inputs and outputs for a GRD file."""
    info_object = buildinfo.DetermineBuildInfo()

    class DummyOpts(object):
      def __init__(self):
        self.input = '../grit/testdata/buildinfo.grd'
        self.print_header = False
        self.verbose = False
        self.extra_verbose = False
    info_object.Run(DummyOpts(), [])
    output = self.buf.getvalue().replace('\\', '/')
    self.failUnless(output.count(r'rc_all|sv_sidebar_loading.html'))
    self.failUnless(output.count(r'rc_header|resource.h'))
    self.failUnless(output.count(r'rc_all|en_generated_resources.rc'))
    self.failUnless(output.count(r'rc_all|sv_generated_resources.rc'))
    self.failUnless(output.count(r'input|../grit/testdata/substitute.xmb'))
    self.failUnless(output.count(r'input|../grit/testdata/pr.bmp'))
    self.failUnless(output.count(r'input|../grit/testdata/pr2.bmp'))
    self.failUnless(
        output.count(r'input|../grit/testdata/sidebar_loading.html'))
    self.failUnless(output.count(r'input|../grit/testdata/transl.rc'))
    self.failUnless(output.count(r'input|../grit/testdata/transl1.rc'))