mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-30 19:20:53 +02:00
Assorted minor test tweaks.
This commit is contained in:
parent
4fe788b092
commit
4ab1fb2bd3
9 changed files with 38 additions and 7 deletions
|
@ -1,5 +1,13 @@
|
||||||
2001-08-22 Bart Schaefer <schaefer@zsh.org>
|
2001-08-22 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 15676: Test/A01grammar.ztst, Test/A05execution.ztst,
|
||||||
|
Test/C02cond.ztst, Test/D04parameter.ztst, Test/E01options.ztst,
|
||||||
|
Test/E02xtrace.ztst, Test/Y01completion.ztst,
|
||||||
|
Test/Y03arguments.ztst: Tweak %prep sections to exit sooner on
|
||||||
|
certain failures (by adding blank lines). Other whitespace-only
|
||||||
|
changes. Avoid [[ ! -r ... ]] test when running as root, as it
|
||||||
|
always fails in that case. Test `typeset -ft' (function trace).
|
||||||
|
|
||||||
* 15608: Completion/Zsh/Command/_cd: Don't treat numbers as
|
* 15608: Completion/Zsh/Command/_cd: Don't treat numbers as
|
||||||
cd-able vars.
|
cd-able vars.
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
mkdir basic.tmp && cd basic.tmp
|
mkdir basic.tmp && cd basic.tmp
|
||||||
|
|
||||||
touch foo bar
|
touch foo bar
|
||||||
|
|
||||||
%test
|
%test
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
cd command.tmp
|
cd command.tmp
|
||||||
|
|
||||||
print '#!/bin/sh\necho This is top' >tstcmd
|
print '#!/bin/sh\necho This is top' >tstcmd
|
||||||
|
|
||||||
print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
|
print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
|
||||||
|
|
||||||
print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
|
print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
|
||||||
|
|
||||||
chmod 755 tstcmd dir1/tstcmd dir2/tstcmd
|
chmod 755 tstcmd dir1/tstcmd dir2/tstcmd
|
||||||
|
|
|
@ -12,10 +12,12 @@
|
||||||
|
|
||||||
touch zerolength
|
touch zerolength
|
||||||
chgrp $EGID zerolength
|
chgrp $EGID zerolength
|
||||||
|
|
||||||
print 'Garbuglio' >nonzerolength
|
print 'Garbuglio' >nonzerolength
|
||||||
|
|
||||||
mkdir modish
|
mkdir modish
|
||||||
chgrp $EGID modish
|
chgrp $EGID modish
|
||||||
|
|
||||||
chmod g+xs modish
|
chmod g+xs modish
|
||||||
chmod u+s modish
|
chmod u+s modish
|
||||||
chmod +t modish
|
chmod +t modish
|
||||||
|
@ -85,7 +87,12 @@
|
||||||
fi
|
fi
|
||||||
0dD:-p cond
|
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
|
0:-r cond
|
||||||
|
|
||||||
[[ -s nonzerolength && ! -s zerolength ]]
|
[[ -s nonzerolength && ! -s zerolength ]]
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
mkdir parameter.tmp
|
mkdir parameter.tmp
|
||||||
|
|
||||||
cd parameter.tmp
|
cd parameter.tmp
|
||||||
|
|
||||||
touch boringfile evenmoreboringfile
|
touch boringfile evenmoreboringfile
|
||||||
|
|
||||||
%test
|
%test
|
||||||
|
|
|
@ -82,8 +82,11 @@
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
mkdir options.tmp && cd options.tmp
|
mkdir options.tmp && cd options.tmp
|
||||||
|
|
||||||
mkdir tmpcd
|
mkdir tmpcd
|
||||||
|
|
||||||
touch tmpfile1 tmpfile2
|
touch tmpfile1 tmpfile2
|
||||||
|
|
||||||
mydir=$PWD
|
mydir=$PWD
|
||||||
mydirt=`print -P %~`
|
mydirt=`print -P %~`
|
||||||
catpath=$(which cat)
|
catpath=$(which cat)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
mkdir xtrace.tmp && cd xtrace.tmp
|
mkdir xtrace.tmp && cd xtrace.tmp
|
||||||
|
|
||||||
function xtf {
|
function xtf {
|
||||||
local regression_test_dummy_variable
|
local regression_test_dummy_variable
|
||||||
print "$*"
|
print "$*"
|
||||||
|
@ -81,3 +82,10 @@
|
||||||
?+(eval):21> . ./xt.in Tracing: source 2>file
|
?+(eval):21> . ./xt.in Tracing: source 2>file
|
||||||
?+./xt.in:1> print Tracing: source 2>file
|
?+./xt.in:1> print Tracing: source 2>file
|
||||||
?+(eval):22> set +x
|
?+(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
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
comptestinit -z $ZTST_testdir/../Src/zsh &&
|
comptestinit -z $ZTST_testdir/../Src/zsh &&
|
||||||
{
|
{
|
||||||
mkdir dir1
|
mkdir dir1 &&
|
||||||
mkdir dir2
|
mkdir dir2 &&
|
||||||
touch file1
|
touch file1 &&
|
||||||
touch file2
|
touch file2
|
||||||
}
|
}
|
||||||
|
|
||||||
%test
|
%test
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
comptestinit -z $ZTST_testdir/../Src/zsh &&
|
comptestinit -z $ZTST_testdir/../Src/zsh &&
|
||||||
{
|
{
|
||||||
comptesteval 'compdef _tst tst'
|
comptesteval 'compdef _tst tst'
|
||||||
tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" }
|
tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" }
|
||||||
}
|
}
|
||||||
|
|
||||||
%test
|
%test
|
||||||
|
|
Loading…
Reference in a new issue