1#!/usr/bin/env python 2 3# Copyright (c) 2011 Google Inc. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7""" 8Verifies that msvs_prebuild and msvs_postbuild can be specified in both 9VS 2008 and 2010. 10""" 11 12import TestGyp 13 14test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all') 15 16test.run_gyp('buildevents.gyp', '-G', 'msvs_version=2008') 17test.must_contain('main.vcproj', 'Name="VCPreBuildEventTool"') 18test.must_contain('main.vcproj', 'Name="VCPostBuildEventTool"') 19 20test.run_gyp('buildevents.gyp', '-G', 'msvs_version=2010') 21test.must_contain('main.vcxproj', '<PreBuildEvent>') 22test.must_contain('main.vcxproj', '<PostBuildEvent>') 23 24test.pass_test() 25