diff options
Diffstat (limited to 'Test')
-rw-r--r-- | Test/A01grammar.ztst | 1 | ||||
-rw-r--r-- | Test/A05execution.ztst | 2 | ||||
-rw-r--r-- | Test/C02cond.ztst | 9 | ||||
-rw-r--r-- | Test/D04parameter.ztst | 2 | ||||
-rw-r--r-- | Test/E01options.ztst | 3 | ||||
-rw-r--r-- | Test/E02xtrace.ztst | 8 | ||||
-rw-r--r-- | Test/Y01completion.ztst | 8 | ||||
-rw-r--r-- | Test/Y03arguments.ztst | 4 |
8 files changed, 30 insertions, 7 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 92fde369b..c55ca4a83 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -5,6 +5,7 @@ %prep mkdir basic.tmp && cd basic.tmp + touch foo bar %test diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst index 18f2a53f1..09ade29d8 100644 --- a/Test/A05execution.ztst +++ b/Test/A05execution.ztst @@ -7,7 +7,9 @@ cd command.tmp print '#!/bin/sh\necho This is top' >tstcmd + print '#!/bin/sh\necho This is dir1' >dir1/tstcmd + print '#!/bin/sh\necho This is dir2' >dir2/tstcmd chmod 755 tstcmd dir1/tstcmd dir2/tstcmd diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst index fd9f1205b..94c86789d 100644 --- a/Test/C02cond.ztst +++ b/Test/C02cond.ztst @@ -12,10 +12,12 @@ touch zerolength chgrp $EGID zerolength + print 'Garbuglio' >nonzerolength mkdir modish chgrp $EGID modish + chmod g+xs modish chmod u+s modish chmod +t modish @@ -85,7 +87,12 @@ fi 0dD:-p cond - [[ -r zerolength && ! -r unmodish ]] + if (( EUID == 0 )); then + print -u8 'Warning: Not testing [[ ! -r file ]] (root reads anything)' + [[ -r zerolength && -r unmodish ]] + else + [[ -r zerolength && ! -r unmodish ]] + fi 0:-r cond [[ -s nonzerolength && ! -s zerolength ]] diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index ace4cbc86..01d71dbc5 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -3,7 +3,9 @@ %prep mkdir parameter.tmp + cd parameter.tmp + touch boringfile evenmoreboringfile %test diff --git a/Test/E01options.ztst b/Test/E01options.ztst index 8060868fc..fe3859d7a 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -82,8 +82,11 @@ %prep mkdir options.tmp && cd options.tmp + mkdir tmpcd + touch tmpfile1 tmpfile2 + mydir=$PWD mydirt=`print -P %~` catpath=$(which cat) diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst index 2782e4e8b..412516cea 100644 --- a/Test/E02xtrace.ztst +++ b/Test/E02xtrace.ztst @@ -2,6 +2,7 @@ %prep mkdir xtrace.tmp && cd xtrace.tmp + function xtf { local regression_test_dummy_variable print "$*" @@ -81,3 +82,10 @@ ?+(eval):21> . ./xt.in Tracing: source 2>file ?+./xt.in:1> print Tracing: source 2>file ?+(eval):22> set +x + + typeset -ft xtf + xtf 'Tracing: function' +0: +>Tracing: function +?+xtf:1> local regression_test_dummy_variable +?+xtf:2> print Tracing: function diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst index 0dfb6c074..49df8ab3a 100644 --- a/Test/Y01completion.ztst +++ b/Test/Y01completion.ztst @@ -8,10 +8,10 @@ comptestinit -z $ZTST_testdir/../Src/zsh && { - mkdir dir1 - mkdir dir2 - touch file1 - touch file2 + mkdir dir1 && + mkdir dir2 && + touch file1 && + touch file2 } %test diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst index 596441358..ba9188357 100644 --- a/Test/Y03arguments.ztst +++ b/Test/Y03arguments.ztst @@ -8,8 +8,8 @@ comptestinit -z $ZTST_testdir/../Src/zsh && { - comptesteval 'compdef _tst tst' - tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" } + comptesteval 'compdef _tst tst' + tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" } } %test |