shithub: rech

ref: d023a73dc8bb187bd9161b0b804e8a097ffa8b8c
dir: /bin/test/vmissingfiles/

View raw version
#!/bin/rc

rfork en

fn testfile{
	test -f $1 || echo ! missing file $1 >[1=2]
}
fn testfileo{
	test -f $1 || echo missing optional file $1 >[1=2]
}

templates=`{cd template; walk -n 1 | grep -v '\.'}
for (t in $templates) {
	testfile template/$t.msg
	testfile template/$t.sed
}

invoices=`{cd invoice; walk -d -n 1}
for (i in $invoices) {
	testfile invoice/$i/client
	testfile invoice/$i/data.tsv
	testfile invoice/$i/date
	testfile invoice/$i/template
	testfileo invoice/$i/msg
}

clients=`{cd client; walk -d -n 1}
for (c in $clients) {
	testfile client/$c/addr
	testfileo client/$c/msg
	testfileo client/$c/vcard.vcf
}