aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-20 01:27:23 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-20 01:27:23 +0000
commit02801e27d5754ebc12bc02e43e244294df1e10a6 (patch)
treea59282e384d50e41b016b72a7b0d27d8d61448c3
parent85aceab31a13551701280a3fe8fc3822f114cc2a (diff)
downloadzsh-02801e27d5754ebc12bc02e43e244294df1e10a6.tar.gz
zsh-02801e27d5754ebc12bc02e43e244294df1e10a6.tar.xz
zsh-02801e27d5754ebc12bc02e43e244294df1e10a6.zip
Initial revision
-rw-r--r--Test/51xtrace.ztst60
1 files changed, 60 insertions, 0 deletions
diff --git a/Test/51xtrace.ztst b/Test/51xtrace.ztst
new file mode 100644
index 000000000..5dac18ff6
--- /dev/null
+++ b/Test/51xtrace.ztst
@@ -0,0 +1,60 @@
+# Test that xtrace output is correctly generated
+
+%prep
+ mkdir xtrace.tmp && cd xtrace.tmp
+
+%test
+
+ set -x
+ print 'Tracing: builtin'
+ print 'Tracing: builtin 2>file' 2>xtrace.err
+ cat <<<'Tracing: external'
+ cat <<<'Tracing: external 2>file' 2>>xtrace.err
+ ( print 'Tracing: ( builtin )' )
+ ( print 'Tracing: ( builtin ) 2>file' ) 2>>xtrace.err
+ ( cat <<<'Tracing: ( external )' )
+ ( cat <<<'Tracing: ( external ) 2>file' ) 2>>xtrace.err
+ { print 'Tracing: { builtin }' }
+ { print 'Tracing: { builtin } 2>file' } 2>>xtrace.err
+ { cat <<<'Tracing: { external }' }
+ { cat <<<'Tracing: { external } 2>file' } 2>>xtrace.err
+ repeat 1 do print 'Tracing: do builtin done'; done
+ repeat 1 do print 'Tracing: do builtin done 2>file'; done 2>>xtrace.err
+ repeat 1 do cat <<<'Tracing: do external done'; done
+ repeat 1 do cat <<<'Tracing: do external done'; done 2>>xtrace.err
+ set +x
+ cat xtrace.err
+0:xtrace with and without redirection
+>Tracing: builtin
+>Tracing: builtin 2>file
+>Tracing: external
+>Tracing: external 2>file
+>Tracing: ( builtin )
+>Tracing: ( builtin ) 2>file
+>Tracing: ( external )
+>Tracing: ( external ) 2>file
+>Tracing: { builtin }
+>Tracing: { builtin } 2>file
+>Tracing: { external }
+>Tracing: { external } 2>file
+>Tracing: do builtin done
+>Tracing: do builtin done 2>file
+>Tracing: do external done
+>Tracing: do external done
+>+ZTST_execchunk:2> print Tracing: ( builtin ) 2>file
+>+ZTST_execchunk:2> cat
+>+ZTST_execchunk:2> print Tracing: { builtin } 2>file
+>+ZTST_execchunk:2> cat
+>+ZTST_execchunk:2> print Tracing: do builtin done 2>file
+>+ZTST_execchunk:2> cat
+?+ZTST_execchunk:2> print Tracing: builtin
+?+ZTST_execchunk:2> print Tracing: builtin 2>file
+?+ZTST_execchunk:2> cat
+?+ZTST_execchunk:2> cat
+?+ZTST_execchunk:2> print Tracing: ( builtin )
+?+ZTST_execchunk:2> cat
+?+ZTST_execchunk:2> print Tracing: { builtin }
+?+ZTST_execchunk:2> cat
+?+ZTST_execchunk:2> print Tracing: do builtin done
+?+ZTST_execchunk:2> cat
+?+ZTST_execchunk:2> set +x