3
# Copyright (c) 2014 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.
8
Verifies that extra filters are pruned correctly for Visual Studio 2008.
16
return re.sub('^ +', '', str, flags=re.M).replace('\n', '')
19
test = TestGyp.TestGyp(formats=['msvs'])
21
test.run_gyp('filters.gyp', '-G', 'standalone', '-G', 'msvs_version=2008')
23
test.must_contain('no_source_files.vcproj', '<Files/>')
25
test.must_contain('one_source_file.vcproj', strip_ws('''\
27
<File RelativePath="..\\folder\\a.c"/>
31
test.must_contain('two_source_files.vcproj', strip_ws('''\
33
<File RelativePath="..\\folder\\a.c"/>
34
<File RelativePath="..\\folder\\b.c"/>
38
test.must_contain('three_files_in_two_folders.vcproj', strip_ws('''\
40
<Filter Name="folder1">
41
<File RelativePath="..\\folder1\\a.c"/>
42
<File RelativePath="..\\folder1\\b.c"/>
44
<Filter Name="folder2">
45
<File RelativePath="..\\folder2\\c.c"/>
50
test.must_contain('nested_folders.vcproj', strip_ws('''\
52
<Filter Name="folder1">
53
<Filter Name="nested">
54
<File RelativePath="..\\folder1\\nested\\a.c"/>
55
<File RelativePath="..\\folder1\\nested\\b.c"/>
58
<File RelativePath="..\\folder1\\other\\c.c"/>
61
<Filter Name="folder2">
62
<File RelativePath="..\\folder2\\d.c"/>