Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/python/gyp/test/ios/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  gyptest-app-ios.py   Sprache: Python

 
#!/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 that ios app bundles are built correctly.
"""

import TestGyp

import subprocess
import sys

def CheckFileXMLPropertyList(file):
  output = subprocess.check_output(['file', file])
  if not 'XML 1.0 document text' in output:
    print('File: Expected XML 1.0 document text, got %s' % output)
    test.fail_test()

def CheckFileBinaryPropertyList(file):
  output = subprocess.check_output(['file', file])
  if not 'Apple binary property list' in output:
    print('File: Expected Apple binary property list, got %s' % output)
    test.fail_test()

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

  test.run_gyp('test.gyp', chdir='app-bundle')

  test.build('test.gyp', test.ALL, chdir='app-bundle')

  # Test that the extension is .bundle
  test.built_file_must_exist('Test App Gyp.app/Test App Gyp',
                             chdir='app-bundle')

  # Info.plist
  info_plist = test.built_file_path('Test App Gyp.app/Info.plist',
                                    chdir='app-bundle')
  test.built_file_must_exist(info_plist)
  CheckFileBinaryPropertyList(info_plist)

  # XML Info.plist
  info_plist = test.built_file_path('Test App Gyp XML.app/Info.plist',
                                    chdir='app-bundle')
  CheckFileXMLPropertyList(info_plist)

  # Resources
  strings_file = test.built_file_path(
      'Test App Gyp.app/English.lproj/InfoPlist.strings',
      chdir='app-bundle')
  test.built_file_must_exist(strings_file)
  CheckFileBinaryPropertyList(strings_file)

  extra_plist_file = test.built_file_path(
      'Test App Gyp.app/English.lproj/LanguageMap.plist',
      chdir='app-bundle')
  test.built_file_must_exist(extra_plist_file)
  CheckFileBinaryPropertyList(extra_plist_file)

  test.built_file_must_exist(
      'Test App Gyp.app/English.lproj/MainMenu.nib',
      chdir='app-bundle')
  test.built_file_must_exist(
      'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc',
      chdir='app-bundle')

  # Packaging
  test.built_file_must_exist('Test App Gyp.app/PkgInfo',
                             chdir='app-bundle')
  test.built_file_must_match('Test App Gyp.app/PkgInfo''APPLause',
                             chdir='app-bundle')

  test.pass_test()

Messung V0.5
C=95 H=98 G=96

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.