t/*: rearrange tests into numbered directories.
It was getting way too ad-hoc in there. Let's reorganize the tests so that there's a good, obvious, suggested sequence to run them in.
This commit is contained in:
parent
116c279e96
commit
7822f5a5bb
170 changed files with 100 additions and 80 deletions
2
t/250-makedir/.gitignore
vendored
Normal file
2
t/250-makedir/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
makedir.log
|
||||
makedir
|
||||
1
t/250-makedir/all.do
Normal file
1
t/250-makedir/all.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
redo makedir2 dirtest/all autosubdir/all
|
||||
3
t/250-makedir/autosubdir/all.do
Normal file
3
t/250-makedir/autosubdir/all.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
rm -rf sub.tmp
|
||||
redo-ifchange sub.tmp/test.txt
|
||||
[ -e sub.tmp/test.txt ] || exit 96
|
||||
2
t/250-makedir/autosubdir/clean.do
Normal file
2
t/250-makedir/autosubdir/clean.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
rm -rf *.tmp
|
||||
rm -f *~ .*~
|
||||
2
t/250-makedir/autosubdir/default.txt.do
Normal file
2
t/250-makedir/autosubdir/default.txt.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mkdir -p $(dirname $1)
|
||||
echo "hello" >$3
|
||||
4
t/250-makedir/clean.do
Normal file
4
t/250-makedir/clean.do
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
redo dirtest/clean autosubdir/clean
|
||||
rm -rf makedir
|
||||
rm -f *~ .*~ makedir.log
|
||||
|
||||
2
t/250-makedir/dirtest/.gitignore
vendored
Normal file
2
t/250-makedir/dirtest/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
log
|
||||
dir1/stinky
|
||||
16
t/250-makedir/dirtest/all.do
Normal file
16
t/250-makedir/dirtest/all.do
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
rm -f log dir1/log dir1/stinky
|
||||
touch t1.do
|
||||
../../flush-cache
|
||||
redo t1
|
||||
touch t1.do
|
||||
../../flush-cache
|
||||
redo t1
|
||||
../../flush-cache
|
||||
redo-ifchange t1
|
||||
C1="$(wc -l <dir1/log)"
|
||||
C2="$(wc -l <log)"
|
||||
. ../../skip-if-minimal-do.sh
|
||||
if [ "$C1" -ne 1 -o "$C2" -ne 2 ]; then
|
||||
echo "failed: t1>t1, c1=$C1, c2=$C2" >&2
|
||||
exit 55
|
||||
fi
|
||||
1
t/250-makedir/dirtest/clean.do
Normal file
1
t/250-makedir/dirtest/clean.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
rm -f *~ .*~ dir1/*~ dir1/.*~ dir1/stinky dir1/log log
|
||||
2
t/250-makedir/dirtest/dir1/go.do
Normal file
2
t/250-makedir/dirtest/dir1/go.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
redo-ifchange stinky
|
||||
echo $$ >>log
|
||||
1
t/250-makedir/dirtest/dir1/stinky.do
Normal file
1
t/250-makedir/dirtest/dir1/stinky.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
echo "I'm stinky"
|
||||
2
t/250-makedir/dirtest/t1.do
Normal file
2
t/250-makedir/dirtest/t1.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
redo-ifchange dir1/go
|
||||
echo $$ >>log
|
||||
3
t/250-makedir/makedir.do
Normal file
3
t/250-makedir/makedir.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
rm -rf "$1"
|
||||
mkdir $1
|
||||
echo $$ >>makedir.log
|
||||
7
t/250-makedir/makedir2.do
Normal file
7
t/250-makedir/makedir2.do
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
rm -f makedir.log
|
||||
redo makedir
|
||||
touch makedir/outfile
|
||||
../flush-cache
|
||||
redo-ifchange makedir
|
||||
COUNT=$(wc -l <makedir.log)
|
||||
[ "$COUNT" -eq 1 ] || exit 99
|
||||
Loading…
Add table
Add a link
Reference in a new issue