Sha256: 8a0629b57023746bf27e7de2717d17e96bd86eca9d9bb27f0ac1d3c0cac55c8b

Contents?: true

Size: 1.24 KB

Versions: 24

Compression:

Stored size: 1.24 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.

"""
Make sure paths are normalized with VS macros properly expanded on Windows.
"""

import TestGyp

import sys

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

  test.run_gyp('normalize-paths.gyp')

  # We can't use existence tests because any case will pass, so we check the
  # contents of ninja files directly since that's what we're most concerned
  # with anyway.
  subninja = open(test.built_file_path('obj/some_target.ninja')).read()
  if '$!product_dir' in subninja:
    test.fail_test()
  if 'out\\Default' in subninja:
    test.fail_test()

  second = open(test.built_file_path('obj/second.ninja')).read()
  if ('..\\..\\things\\AnotherName.exe' in second or
      'AnotherName.exe' not in second):
    test.fail_test()

  action = open(test.built_file_path('obj/action.ninja')).read()
  if '..\\..\\out\\Default' in action:
    test.fail_test()
  if '..\\..\\SomethingElse' in action or 'SomethingElse' not in action:
    test.fail_test()
  if '..\\..\\SomeOtherInput' in action or 'SomeOtherInput' not in action:
    test.fail_test()

  test.pass_test()

Version data entries

24 entries across 24 versions & 4 rubygems

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