diff options
Diffstat (limited to 'test/MSVS/vs-6.0-files.py')
-rw-r--r-- | test/MSVS/vs-6.0-files.py | 76 |
1 files changed, 17 insertions, 59 deletions
diff --git a/test/MSVS/vs-6.0-files.py b/test/MSVS/vs-6.0-files.py index 7287e5a..3e75626 100644 --- a/test/MSVS/vs-6.0-files.py +++ b/test/MSVS/vs-6.0-files.py @@ -29,9 +29,6 @@ Test that we can generate Visual Studio 6 project (.dsp) and solution (.dsw) files that look correct. """ -import os -import sys - import TestSConsMSVS test = TestSConsMSVS.TestSConsMSVS() @@ -47,74 +44,35 @@ SConscript_contents = TestSConsMSVS.SConscript_contents_6_0 -test.subdir('work1') - -test.write(['work1', 'SConstruct'], SConscript_contents) +test.write('SConstruct', SConscript_contents) -test.run(chdir='work1', arguments="Test.dsp") +test.run(arguments="Test.dsp") -test.must_exist(test.workpath('work1', 'Test.dsp')) -dsp = test.read(['work1', 'Test.dsp'], 'r') -expect = test.msvs_substitute(expected_dspfile, '6.0', 'work1', 'SConstruct') +test.must_exist(test.workpath('Test.dsp')) +dsp = test.read('Test.dsp', 'r') +expect = test.msvs_substitute(expected_dspfile, '6.0', None, 'SConstruct') # don't compare the pickled data assert dsp[:len(expect)] == expect, test.diff_substr(expect, dsp) -test.must_exist(test.workpath('work1', 'Test.dsw')) -dsw = test.read(['work1', 'Test.dsw'], 'r') -expect = test.msvs_substitute(expected_dswfile, '6.0', 'work1', 'SConstruct') +test.must_exist(test.workpath('Test.dsw')) +dsw = test.read('Test.dsw', 'r') +expect = test.msvs_substitute(expected_dswfile, '6.0', None, 'SConstruct') assert dsw == expect, test.diff_substr(expect, dsw) -test.run(chdir='work1', arguments='-c .') - -test.must_not_exist(test.workpath('work1', 'Test.dsp')) -test.must_not_exist(test.workpath('work1', 'Test.dsw')) - -test.run(chdir='work1', arguments='Test.dsp') - -test.must_exist(test.workpath('work1', 'Test.dsp')) -test.must_exist(test.workpath('work1', 'Test.dsw')) - -test.run(chdir='work1', arguments='-c Test.dsw') - -test.must_not_exist(test.workpath('work1', 'Test.dsp')) -test.must_not_exist(test.workpath('work1', 'Test.dsw')) +test.run(arguments='-c .') +test.must_not_exist(test.workpath('Test.dsp')) +test.must_not_exist(test.workpath('Test.dsw')) +test.run(arguments='Test.dsp') -test.subdir('work2', ['work2', 'src']) +test.must_exist(test.workpath('Test.dsp')) +test.must_exist(test.workpath('Test.dsw')) -test.write(['work2', 'SConstruct'], """\ -SConscript('src/SConscript', variant_dir='build') -""") - -test.write(['work2', 'src', 'SConscript'], SConscript_contents) - -test.run(chdir='work2', arguments=".") - -dsp = test.read(['work2', 'src', 'Test.dsp'], 'r') -expect = test.msvs_substitute(expected_dspfile, '6.0', 'work2', 'SConstruct') -# don't compare the pickled data -assert dsp[:len(expect)] == expect, test.diff_substr(expect, dsp) - -test.must_exist(test.workpath('work2', 'src', 'Test.dsw')) -dsw = test.read(['work2', 'src', 'Test.dsw'], 'r') -expect = test.msvs_substitute(expected_dswfile, '6.0', - os.path.join('work2', 'src')) -assert dsw == expect, test.diff_substr(expect, dsw) +test.run(arguments='-c Test.dsw') -test.must_match(['work2', 'build', 'Test.dsp'], """\ -This is just a placeholder file. -The real project file is here: -%s -""" % test.workpath('work2', 'src', 'Test.dsp'), - mode='r') - -test.must_match(['work2', 'build', 'Test.dsw'], """\ -This is just a placeholder file. -The real workspace file is here: -%s -""" % test.workpath('work2', 'src', 'Test.dsw'), - mode='r') +test.must_not_exist(test.workpath('Test.dsp')) +test.must_not_exist(test.workpath('Test.dsw')) |