##// END OF EJS Templates
tests: rework util.debugstacktrace tests...
Mads Kiilerich -
r31313:80752c65 default
parent child Browse files
Show More
@@ -116,18 +116,25 b' Test internal debugstacktrace command'
116 $ cat > debugstacktrace.py << EOF
116 $ cat > debugstacktrace.py << EOF
117 > from mercurial.util import debugstacktrace, dst, sys
117 > from mercurial.util import debugstacktrace, dst, sys
118 > def f():
118 > def f():
119 > dst('hello world')
119 > debugstacktrace(f=sys.stdout)
120 > g()
120 > def g():
121 > def g():
121 > f()
122 > dst('hello from g\\n', skip=1)
122 > debugstacktrace(skip=-5, f=sys.stdout)
123 > h()
123 > g()
124 > def h():
125 > dst('hi ...\\nfrom h hidden in g', 1)
126 > f()
124 > EOF
127 > EOF
125 $ python debugstacktrace.py
128 $ python debugstacktrace.py
126 hello world at:
127 debugstacktrace.py:7 in * (glob)
128 debugstacktrace.py:5 in g
129 debugstacktrace.py:3 in f
130 stacktrace at:
129 stacktrace at:
131 debugstacktrace.py:7 *in * (glob)
130 debugstacktrace.py:10 in * (glob)
132 debugstacktrace.py:6 *in g (glob)
131 debugstacktrace.py:3 in f
133 */util.py:* in debugstacktrace (glob)
132 hello from g
133 at:
134 debugstacktrace.py:10 in * (glob)
135 debugstacktrace.py:4 in f
136 hi ...
137 from h hidden in g at:
138 debugstacktrace.py:10 in * (glob)
139 debugstacktrace.py:4 in f
140 debugstacktrace.py:7 in g
General Comments 0
You need to be logged in to leave comments. Login now