gyptest-macro-vcinstalldir.py 719 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # Copyright (c) 2012 Google Inc. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """
  6. Make sure macro expansion of $(VCInstallDir) is handled, and specifically
  7. always / terminated for compatibility.
  8. """
  9. import TestGyp
  10. import sys
  11. if sys.platform == 'win32':
  12. test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
  13. CHDIR = 'vs-macros'
  14. test.run_gyp('vcinstalldir.gyp', chdir=CHDIR)
  15. # This fails on VS because the trailing slash escapes the trailing quote.
  16. test.build('vcinstalldir.gyp', 'test_slash_trailing', chdir=CHDIR, status=1)
  17. test.build('vcinstalldir.gyp', 'test_slash_dir', chdir=CHDIR)
  18. test.pass_test()