Sha256: ea06efeff57b6520df2b0874ab602611bcaf9a8347f8c6d7a700e61db4bfcc52

Contents?: true

Size: 1.64 KB

Versions: 41

Compression:

Stored size: 1.64 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Verifies the Info.plist preprocessor functionality.
"""

import TestGyp

import sys

if sys.platform == 'darwin':
  test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])

  CHDIR = 'infoplist-process'
  INFO_PLIST_PATH = 'Test.app/Contents/Info.plist'

  # First process both keys.
  test.set_configuration('One')
  test.run_gyp('test1.gyp', chdir=CHDIR)
  test.build('test1.gyp', test.ALL, chdir=CHDIR)
  info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR)
  test.must_exist(info_plist)
  test.must_contain(info_plist, 'Foo')
  test.must_contain(info_plist, 'Bar')

  # Then process a single key.
  test.set_configuration('Two')
  test.run_gyp('test2.gyp', chdir=CHDIR)
  test.build('test2.gyp', chdir=CHDIR)
  info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR)
  test.must_exist(info_plist)
  test.must_contain(info_plist, 'com.google.Test')  # Normal expansion works.
  test.must_contain(info_plist, 'Foo (Bar)')
  test.must_contain(info_plist, 'PROCESSED_KEY2')

  # Then turn off the processor.
  test.set_configuration('Three')
  test.run_gyp('test3.gyp', chdir=CHDIR)
  test.build('test3.gyp', chdir=CHDIR)
  info_plist = test.built_file_path('Test App.app/Contents/Info.plist',
                                    chdir=CHDIR)
  test.must_exist(info_plist)
  test.must_contain(info_plist, 'com.google.Test')  # Normal expansion works.
  test.must_contain(info_plist, 'PROCESSED_KEY1')
  test.must_contain(info_plist, 'PROCESSED_KEY2')

  test.pass_test()

Version data entries

41 entries across 41 versions & 6 rubygems

Version Path
libv8-3.16.14.19.1 vendor/gyp/test/mac/gyptest-infoplist-process.py
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.19 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.18 vendor/gyp/test/mac/gyptest-infoplist-process.py
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/gyp/test/mac/gyptest-infoplist-process.py
arcabouco-0.2.13 vendor/bundle/gems/libv8-3.16.14.17/vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.17 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.16 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.15 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.14 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-tmpfork-3.16.14.13 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.13 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.12 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.11 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.10 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.8 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.8.rc1 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.7 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.6 vendor/gyp/test/mac/gyptest-infoplist-process.py
libv8-3.16.14.5 vendor/gyp/test/mac/gyptest-infoplist-process.py