# HG changeset patch # User Mads Kiilerich # Date 1421378800 -3600 # Node ID 80752c655320e9300a66c77cc9b2bc34bf70e533 # Parent 7eb53603744b7572998ea5569355e7e7dc828e18 tests: rework util.debugstacktrace tests Prepare for adding another test. diff -r 7eb53603744b -r 80752c655320 tests/test-debugcommands.t --- 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