tests/test-debugcommands.t
changeset 20244 47d0843647d1
parent 17188 76e55914c303
child 20283 2b96073f3138
--- a/tests/test-debugcommands.t	Tue Jan 07 22:29:57 2014 +0100
+++ b/tests/test-debugcommands.t	Sun Jan 12 23:28:21 2014 +0100
@@ -23,3 +23,25 @@
   uncompressed data size (min/max/avg) : 43 / 43 / 43
   full revision size (min/max/avg)     : 44 / 44 / 44
   delta size (min/max/avg)             : 0 / 0 / 0
+
+
+Test internal debugstacktrace command
+
+  $ cat > debugstacktrace.py << EOF
+  > from mercurial.util import debugstacktrace, dst, sys
+  > def f():
+  >     dst('hello world')
+  > def g():
+  >     f()
+  >     debugstacktrace(skip=-5, f=sys.stdout)
+  > g()
+  > EOF
+  $ python debugstacktrace.py
+  hello world at:
+   debugstacktrace.py:7 in <module>
+   debugstacktrace.py:5 in g
+   debugstacktrace.py:3 in f
+  stacktrace at:
+   debugstacktrace.py:7 *in <module> (glob)
+   debugstacktrace.py:6 *in g (glob)
+   */util.py:* in debugstacktrace (glob)