Source

SCons / test / Move.py

Diff from to

test/Move.py

 
 test.write('SConstruct', """
 Execute(Move('f1.out', 'f1.in'))
+Execute(Move('File-f1.out', File('f1.in-File')))
 def cat(env, source, target):
     target = str(target[0])
     source = map(str, source)
 """)
 
 test.write('f1.in', "f1.in\n")
+test.write('f1.in-File', "f1.in-File\n")
 test.write('f2.in', "f2.in\n")
 test.write('f3.in', "f3.in\n")
 test.write('f4.in', "f4.in\n")
 test.write('f6.in', "f6.in\n")
 test.write('f6.in-Move', "f6.in-Move\n")
 
-expect = test.wrap_stdout(read_str = 'Move("f1.out", "f1.in")\n',
+expect = test.wrap_stdout(read_str = """\
+Move("f1.out", "f1.in")
+Move("File-f1.out", "f1.in-File")
+""",
                           build_str = """\
 cat(["f2.out"], ["f2.in"])
 Move("f3.out", "f3.in")
 test.run(options = '-n', arguments = '.', stdout = expect)
 
 test.must_not_exist('f1.out')
+test.must_not_exist('File-f1.out')
 test.must_not_exist('f2.out')
 test.must_not_exist('f3.out')
 test.must_not_exist('f4.out')
 test.run()
 
 test.must_match('f1.out', "f1.in\n")
+test.must_match('File-f1.out', "f1.in-File\n")
 test.must_match('f2.out', "f2.in\n")
 test.must_not_exist('f3.in')
 test.must_match('f3.out', "f3.in\n")