Issue 2368: Fix an exception when a null command-line argument is
[scons.git] / test / dependency-cycle.py
index a907ff687e07228a8b7120522d88336d5bb4406e..42c9392c614d412b8ab4dfa51372baabc200f71e 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2001 Steven Knight
+# __COPYRIGHT__
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -22,7 +22,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "test/dependency-cycle.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 import TestSCons
 import TestCmd
@@ -40,19 +40,30 @@ env.Depends(foo3, foo1)
 """)
 
 test.write('f1.c', r"""
+#include <stdio.h>
 void
 f1(void)
 {
-       printf("f1.c\n");
-}
+        printf("f1.c\n");
+} 
 """)
 
-test.run(arguments = ".", stdout = "", stderr=r"""
-SCons error: Dependency cycle: .*foo1.* -> .*foo3.* -> .*foo2.* -> .*foo1.* -> \.
+test.run(arguments = ".", stderr=r"""
+scons: \*\*\* Found dependency cycle\(s\):
+  .*foo1.* -> .*foo3.* -> .*foo2.* -> .*foo1.*
+  .*foo3.* -> .*foo2.* -> .*foo1.* -> .*foo3.*
+
 .*
-""")
+""", status=2)
+
+test.fail_test(test.stdout() == "")
 
 
 test.pass_test()
 
 
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: