Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: test/mac/gyptest-app.py

Issue 23710010: ninja&make/mac: Convert .strings files to UTF-16LE, not just UTF-16. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/mac_tool.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.must_exist(strings)
49 # Xcodes writes UTF-16LE with BOM.
50 test.must_contain(strings, '\xff\xfe' + '/* Localized'.encode('utf-16le'))
51
48 test.built_file_must_exist( 52 test.built_file_must_exist(
49 'Test App Gyp.app/Contents/Resources/English.lproj/MainMenu.nib', 53 'Test App Gyp.app/Contents/Resources/English.lproj/MainMenu.nib',
50 chdir='app-bundle') 54 chdir='app-bundle')
51 55
52 # Packaging 56 # Packaging
53 test.built_file_must_exist('Test App Gyp.app/Contents/PkgInfo', 57 test.built_file_must_exist('Test App Gyp.app/Contents/PkgInfo',
54 chdir='app-bundle') 58 chdir='app-bundle')
55 test.built_file_must_match('Test App Gyp.app/Contents/PkgInfo', 'APPLause', 59 test.built_file_must_match('Test App Gyp.app/Contents/PkgInfo', 'APPLause',
56 chdir='app-bundle') 60 chdir='app-bundle')
57 61
58 # Check that no other files get added to the bundle. 62 # 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'))) != \ 63 if set(ls(test.built_file_path('Test App Gyp.app', chdir='app-bundle'))) != \
60 set(['Contents/MacOS/Test App Gyp', 64 set(['Contents/MacOS/Test App Gyp',
61 'Contents/Info.plist', 65 'Contents/Info.plist',
62 'Contents/Resources/English.lproj/InfoPlist.strings', 66 'Contents/Resources/English.lproj/InfoPlist.strings',
63 'Contents/Resources/English.lproj/MainMenu.nib', 67 'Contents/Resources/English.lproj/MainMenu.nib',
64 'Contents/PkgInfo', 68 'Contents/PkgInfo',
65 ]): 69 ]):
66 test.fail_test() 70 test.fail_test()
67 71
68 test.pass_test() 72 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/mac_tool.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698