Ejemplo n.º 1
0
    def testMakeDepsFileUnicode(self):
        sources = {}
        sources['test.js'] = MockSource([u'A'], [u'B', u'C'])
        deps = depswriter.MakeDepsFile(sources)

        self.assertEqual(
            'goog.addDependency(\'test.js\', [\'A\'], [\'B\', \'C\'], false);\n',
            deps)
Ejemplo n.º 2
0
    def testMakeDepsFileModule(self):
        sources = {}
        sources['test.js'] = MockSource(['A'], ['B', 'C'], True)
        deps = depswriter.MakeDepsFile(sources)

        self.assertEqual(
            "goog.addDependency('test.js', "
            "['A'], ['B', 'C'], {'module': 'goog'});\n", deps)