Sha256: 1f50dcdeacaf7d07b9d806af3e75ae05a32f0b5698020c15ea2f5e1526b8db55

Contents?: true

Size: 1.36 KB

Versions: 5

Compression:

Stored size: 1.36 KB

Contents

#!/usr/bin/env python

# Copyright (c) 2013 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 mapfile settings are extracted properly.
"""

import TestGyp

import sys

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

  CHDIR = 'linker-flags'
  test.run_gyp('mapfile.gyp', chdir=CHDIR)
  test.build('mapfile.gyp', test.ALL, chdir=CHDIR)

  map_file = test.built_file_path('test_mapfile_unset.map', chdir=CHDIR)
  test.must_not_exist(map_file)

  map_file = test.built_file_path('test_mapfile_generate.map', chdir=CHDIR)
  test.must_exist(map_file)
  test.must_contain(map_file, '?AnExportedFunction@@YAXXZ')
  test.must_not_contain(map_file, 'void __cdecl AnExportedFunction(void)')

  map_file = test.built_file_path('test_mapfile_generate_exports.map',
          chdir=CHDIR)
  test.must_exist(map_file)
  test.must_contain(map_file, 'void __cdecl AnExportedFunction(void)')

  map_file = test.built_file_path('test_mapfile_generate_filename.map',
          chdir=CHDIR)
  test.must_not_exist(map_file)

  map_file = test.built_file_path('custom_file_name.map', chdir=CHDIR)
  test.must_exist(map_file)
  test.must_contain(map_file, '?AnExportedFunction@@YAXXZ')
  test.must_not_contain(map_file, 'void __cdecl AnExportedFunction(void)')

  test.pass_test()

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mt-libuv-4.1.04 ext/gyp/test/win/gyptest-link-mapfile.py
mt-libuv-4.1.03 ext/gyp/test/win/gyptest-link-mapfile.py
mt-libuv-4.1.02 ext/gyp/test/win/gyptest-link-mapfile.py
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-mapfile.py
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/gyp/test/win/gyptest-link-mapfile.py