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 simplest-possible build of a "Hello, world!" program
9using the default build target.
10"""
11
12import TestGyp
13
14test = TestGyp.TestGyp(workdir='workarea_default', formats=['msvs'])
15
16# Run from down in foo.
17test.run_gyp('a.gyp', chdir='foo/a')
18sln = test.workpath('foo/a/a.sln')
19sln_data = open(sln, 'rb').read()
20vcproj = sln_data.count('b.vcproj')
21vcxproj = sln_data.count('b.vcxproj')
22if (vcproj, vcxproj) not in [(1, 0), (0, 1)]:
23  test.fail_test()
24
25test.pass_test()
26