Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: test/msvs/filters/gyptest-filters-2010.py

Issue 1188553003: MSVS: Normalize paths against gyp directory. (Closed) Base URL: http://chromium.googlesource.com/external/gyp@master
Patch Set: Fix last style change Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/msvs/filters/subdir/subdir.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2014 Google Inc. All rights reserved. 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 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies that extra filters are pruned correctly for Visual Studio 2010 8 Verifies that extra filters are pruned correctly for Visual Studio 2010
9 and later. 9 and later.
10 """ 10 """
11 11
12 import TestGyp 12 import TestGyp
13 import os
13 14
14 15
15 test = TestGyp.TestGyp(formats=['msvs']) 16 test = TestGyp.TestGyp(formats=['msvs'])
16 17
17 test.run_gyp('filters.gyp', '-G', 'standalone', '-G', 'msvs_version=2010') 18 test.run_gyp('filters.gyp', '-G', 'standalone', '-G', 'msvs_version=2010')
18 19
19 test.must_not_exist('no_source_files.vcxproj.filters') 20 test.must_not_exist('no_source_files.vcxproj.filters')
20 21
21 test.must_not_exist('one_source_file.vcxproj.filters') 22 test.must_not_exist('one_source_file.vcxproj.filters')
22 23
(...skipping 23 matching lines...) Expand all
46 </ClCompile> 47 </ClCompile>
47 <ClCompile Include="..\\folder1\\nested\\b.c"> 48 <ClCompile Include="..\\folder1\\nested\\b.c">
48 <Filter>folder1\\nested</Filter> 49 <Filter>folder1\\nested</Filter>
49 </ClCompile> 50 </ClCompile>
50 <ClCompile Include="..\\folder1\\other\\c.c"> 51 <ClCompile Include="..\\folder1\\other\\c.c">
51 <Filter>folder1\\other</Filter> 52 <Filter>folder1\\other</Filter>
52 </ClCompile> 53 </ClCompile>
53 </ItemGroup> 54 </ItemGroup>
54 '''.replace('\n', '\r\n')) 55 '''.replace('\n', '\r\n'))
55 56
57 subdir_gyp = os.path.join('subdir', 'subdir.gyp')
58 test.run_gyp(subdir_gyp, '-G', 'standalone', '-G', 'msvs_version=2010')
59
60 test.must_contain(os.path.join('subdir', 'normalize.vcxproj.filters'), '''\
61 <ItemGroup>
62 <ClCompile Include="folder1\\a.c">
63 <Filter>folder1</Filter>
64 </ClCompile>
65 <ClCompile Include="folder2\\b.c">
66 <Filter>folder2</Filter>
67 </ClCompile>
68 </ItemGroup>
69 '''.replace('\n', '\r\n'))
56 70
57 test.pass_test() 71 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/msvs/filters/subdir/subdir.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698