Change the double quotes around an up-to-date target to be like Make.
[scons.git] / test / option--debug.py
index 6561a057fe9b5407323ded9ff4b450b0bc4bf55c..05839127bbd449e245cf415398fdada572ba4e13 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2001, 2002 Steven Knight
+# __COPYRIGHT__
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -94,7 +94,20 @@ tree = """
 test.run(arguments = "--debug=dtree foo.xxx")
 test.fail_test(string.find(test.stdout(), tree) == -1)
 
-tree = """scons: \".\" is up to date.
+tree = """
++-foo.c
+  +-foo.h
+    +-bar.h
+"""
+test.run(arguments = "--debug=includes foo.ooo")
+test.fail_test(string.find(test.stdout(), tree) == -1)
+
+# these shouldn't print out anything in particular, but
+# they shouldn't crash either:
+test.run(arguments = "--debug=includes .")
+test.run(arguments = "--debug=includes foo.c")
+
+tree = """scons: `.' is up to date.
 
 +-.
   +-SConstruct
@@ -121,7 +134,7 @@ tree = """scons: \".\" is up to date.
       +-foo.h
 """
 test.run(arguments = "--debug=tree .")
-test.fail_test(string.find(test.stdout(), tree) != 0)
+test.fail_test(string.find(test.stdout(), tree) == -1)
 
 test.run(arguments = "--debug=pdb", stdin = "n\ns\nq\n")
 test.fail_test(string.find(test.stdout(), "(Pdb)") == -1)
@@ -150,7 +163,7 @@ def num(match, line):
     return float(re.match(match, line).group(1))
 
 start_time = time.time()
-test.run(program=sys.executable, arguments='-c pass')
+test.run(program=TestSCons.python, arguments='-c pass')
 overhead = time.time() - start_time 
 
 start_time = time.time()
@@ -163,7 +176,6 @@ cmdline = filter(lambda x: x[:23] == "Command execution time:", line)
 expected_command_time = num(r'Command execution time: (\d+\.\d+) seconds', cmdline[0])
 expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[1])
 expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[2])
-expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[3])
 
 totalline = filter(lambda x: x[:6] == "Total ", line)