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