OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2013 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 things related to bundle resources. |
| 9 """ |
| 10 |
| 11 import TestGyp |
| 12 |
| 13 import sys |
| 14 |
| 15 if sys.platform == 'darwin': |
| 16 # set |match| to ignore build stderr output. |
| 17 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) |
| 18 |
| 19 CHDIR = 'bundle-resources' |
| 20 test.run_gyp('test.gyp', chdir=CHDIR) |
| 21 |
| 22 test.build('test.gyp', test.ALL, chdir=CHDIR) |
| 23 |
| 24 test.built_file_must_match('resource.app/Contents/Resources/secret.txt', |
| 25 'abc\n', chdir=CHDIR) |
| 26 test.built_file_must_match('source_rule.app/Contents/Resources/secret.txt', |
| 27 'ABC\n', chdir=CHDIR) |
| 28 |
| 29 # TODO(thakis): This currently fails with make. |
| 30 if test.format != 'make': |
| 31 test.built_file_must_match( |
| 32 'resource_rule.app/Contents/Resources/secret.txt', 'ABC\n', chdir=CHDIR) |
| 33 |
| 34 test.pass_test() |
OLD | NEW |