Home | History | Annotate | Download | only in inheritance
      1 #!/usr/bin/env python
      2 
      3 # Copyright 2014 Google Inc. All rights reserved.
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 """
      8 Verifies that configurations do not duplicate other settings.
      9 """
     10 
     11 import TestGyp
     12 
     13 test = TestGyp.TestGyp(format='gypd')
     14 
     15 test.run_gyp('duplicates.gyp')
     16 
     17 # Verify the duplicates.gypd against the checked-in expected contents.
     18 #
     19 # Normally, we should canonicalize line endings in the expected
     20 # contents file setting the Subversion svn:eol-style to native,
     21 # but that would still fail if multiple systems are sharing a single
     22 # workspace on a network-mounted file system.  Consequently, we
     23 # massage the Windows line endings ('\r\n') in the output to the
     24 # checked-in UNIX endings ('\n').
     25 
     26 contents = test.read('duplicates.gypd').replace(
     27     '\r', '').replace('\\\\', '/')
     28 expect = test.read('duplicates.gypd.golden').replace('\r', '')
     29 if not test.match(contents, expect):
     30   print "Unexpected contents of `duplicates.gypd'"
     31   test.diff(expect, contents, 'duplicates.gypd ')
     32   test.fail_test()
     33 
     34 test.pass_test()
     35