5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__
= "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
28 Test that we can generate Visual Studio 6 project (.dsp) and solution
29 (.dsw) files that look correct.
34 test
= TestSConsMSVS
.TestSConsMSVS()
35 host_arch
= test
.get_vs_host_arch()
37 # Make the test infrastructure think we have this version of MSVS installed.
38 test
._msvs
_versions
= ['6.0']
41 expected_dspfile
= TestSConsMSVS
.expected_dspfile_6_0
42 expected_dswfile
= TestSConsMSVS
.expected_dswfile_6_0
43 SConscript_contents
= TestSConsMSVS
.SConscript_contents_6_0
46 test
.write('SConstruct', SConscript_contents
%{'HOST_ARCH': host_arch
})
48 test
.run(arguments
="Test.dsp")
50 test
.must_exist(test
.workpath('Test.dsp'))
51 dsp
= test
.read('Test.dsp', 'r')
52 expect
= test
.msvs_substitute(expected_dspfile
, '6.0', None, 'SConstruct')
53 # don't compare the pickled data
54 assert dsp
[:len(expect
)] == expect
, test
.diff_substr(expect
, dsp
)
56 test
.must_exist(test
.workpath('Test.dsw'))
57 dsw
= test
.read('Test.dsw', 'r')
58 expect
= test
.msvs_substitute(expected_dswfile
, '6.0', None, 'SConstruct')
59 assert dsw
== expect
, test
.diff_substr(expect
, dsw
)
61 test
.run(arguments
='-c .')
63 test
.must_not_exist(test
.workpath('Test.dsp'))
64 test
.must_not_exist(test
.workpath('Test.dsw'))
66 test
.run(arguments
='Test.dsp')
68 test
.must_exist(test
.workpath('Test.dsp'))
69 test
.must_exist(test
.workpath('Test.dsw'))
71 test
.run(arguments
='-c Test.dsw')
73 test
.must_not_exist(test
.workpath('Test.dsp'))
74 test
.must_not_exist(test
.workpath('Test.dsw'))
82 # indent-tabs-mode:nil
84 # vim: set expandtab tabstop=4 shiftwidth=4: