| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2012 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 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 app bundles are built correctly. | 8 Verifies that app bundles are built correctly. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 chdir='app-bundle') | 35 chdir='app-bundle') |
| 36 | 36 |
| 37 # Info.plist | 37 # Info.plist |
| 38 info_plist = test.built_file_path('Test App Gyp.app/Contents/Info.plist', | 38 info_plist = test.built_file_path('Test App Gyp.app/Contents/Info.plist', |
| 39 chdir='app-bundle') | 39 chdir='app-bundle') |
| 40 test.must_exist(info_plist) | 40 test.must_exist(info_plist) |
| 41 test.must_contain(info_plist, 'com.google.Test App Gyp') # Variable expansion | 41 test.must_contain(info_plist, 'com.google.Test App Gyp') # Variable expansion |
| 42 test.must_not_contain(info_plist, '${MACOSX_DEPLOYMENT_TARGET}'); | 42 test.must_not_contain(info_plist, '${MACOSX_DEPLOYMENT_TARGET}'); |
| 43 | 43 |
| 44 # Resources | 44 # Resources |
| 45 test.built_file_must_exist( | 45 strings = test.built_file_path( |
| 46 'Test App Gyp.app/Contents/Resources/English.lproj/InfoPlist.strings', | 46 'Test App Gyp.app/Contents/Resources/English.lproj/InfoPlist.strings', |
| 47 chdir='app-bundle') | 47 chdir='app-bundle') |
| 48 test.built_file_must_exist(strings) |
| 49 test.must_contain(strings, '\xff\xfe' + '/* Localized'.encode('utf-16le')) |
| 50 |
| 48 test.built_file_must_exist( | 51 test.built_file_must_exist( |
| 49 'Test App Gyp.app/Contents/Resources/English.lproj/MainMenu.nib', | 52 'Test App Gyp.app/Contents/Resources/English.lproj/MainMenu.nib', |
| 50 chdir='app-bundle') | 53 chdir='app-bundle') |
| 51 | 54 |
| 52 # Packaging | 55 # Packaging |
| 53 test.built_file_must_exist('Test App Gyp.app/Contents/PkgInfo', | 56 test.built_file_must_exist('Test App Gyp.app/Contents/PkgInfo', |
| 54 chdir='app-bundle') | 57 chdir='app-bundle') |
| 55 test.built_file_must_match('Test App Gyp.app/Contents/PkgInfo', 'APPLause', | 58 test.built_file_must_match('Test App Gyp.app/Contents/PkgInfo', 'APPLause', |
| 56 chdir='app-bundle') | 59 chdir='app-bundle') |
| 57 | 60 |
| 58 # Check that no other files get added to the bundle. | 61 # Check that no other files get added to the bundle. |
| 59 if set(ls(test.built_file_path('Test App Gyp.app', chdir='app-bundle'))) != \ | 62 if set(ls(test.built_file_path('Test App Gyp.app', chdir='app-bundle'))) != \ |
| 60 set(['Contents/MacOS/Test App Gyp', | 63 set(['Contents/MacOS/Test App Gyp', |
| 61 'Contents/Info.plist', | 64 'Contents/Info.plist', |
| 62 'Contents/Resources/English.lproj/InfoPlist.strings', | 65 'Contents/Resources/English.lproj/InfoPlist.strings', |
| 63 'Contents/Resources/English.lproj/MainMenu.nib', | 66 'Contents/Resources/English.lproj/MainMenu.nib', |
| 64 'Contents/PkgInfo', | 67 'Contents/PkgInfo', |
| 65 ]): | 68 ]): |
| 66 test.fail_test() | 69 test.fail_test() |
| 67 | 70 |
| 68 test.pass_test() | 71 test.pass_test() |
| OLD | NEW |