changeset 31322:80752c655320

tests: rework util.debugstacktrace tests Prepare for adding another test.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 16 Jan 2015 04:26:40 +0100
parents 7eb53603744b
children 7c877cbf30d6
files tests/test-debugcommands.t
diffstat 1 files changed, 18 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-debugcommands.t	Sat Mar 11 11:04:14 2017 -0800
+++ b/tests/test-debugcommands.t	Fri Jan 16 04:26:40 2015 +0100
@@ -116,18 +116,25 @@
   $ cat > debugstacktrace.py << EOF
   > from mercurial.util import debugstacktrace, dst, sys
   > def f():
-  >     dst('hello world')
+  >     debugstacktrace(f=sys.stdout)
+  >     g()
   > def g():
-  >     f()
-  >     debugstacktrace(skip=-5, f=sys.stdout)
-  > g()
+  >     dst('hello from g\\n', skip=1)
+  >     h()
+  > def h():
+  >     dst('hi ...\\nfrom h hidden in g', 1)
+  > f()
   > EOF
   $ python debugstacktrace.py
-  hello world at:
-   debugstacktrace.py:7 in * (glob)
-   debugstacktrace.py:5 in g
-   debugstacktrace.py:3 in f
   stacktrace at:
-   debugstacktrace.py:7 *in * (glob)
-   debugstacktrace.py:6 *in g (glob)
-   */util.py:* in debugstacktrace (glob)
+   debugstacktrace.py:10 in * (glob)
+   debugstacktrace.py:3  in f
+  hello from g
+   at:
+   debugstacktrace.py:10 in * (glob)
+   debugstacktrace.py:4  in f
+  hi ...
+  from h hidden in g at:
+   debugstacktrace.py:10 in * (glob)
+   debugstacktrace.py:4  in f
+   debugstacktrace.py:7  in g