#!/usr/bin/perl
#xsltproc html/mod_survey.xsl tests/BOOLEAN.survey > /tmp/output.html
system "rm -rf output/html/*.html";
system "rm -rf output/fo/*.fo";
system "rm -rf output/pdf/*.pdf";
open(PIPE,"find tests -name \"*.survey\" |") || die "could not open pipe\n\n";
@tests = ("example");
#while($inlin = )
#{
# chomp($inlin);
#
# $inlin =~ s/^tests\///;
# $inlin =~ s/\.survey$//;
#
# push(@tests,$inlin);
#}
#
#close(PIPE);
foreach $t (@tests)
{
print "xsltproc html/mod_survey.xsl tests/$t.survey > output/html/$t.html\n";
if(system("xsltproc html/mod_survey.xsl tests/$t.survey > output/html/$t.html"))
{
die "test failed\n\n";
}
}
foreach $t (@tests)
{
print "xsltproc fo/mod_survey.xsl tests/$t.survey > output/fo/$t.fo\n";
if(system("xsltproc fo/mod_survey.xsl tests/$t.survey > output/fo/$t.fo"))
{
die "test failed\n\n";
}
}
chdir "output/fo";
foreach $t (@tests)
{
print "fop $t.fo ../pdf/$t.pdf\n";
if(system("fop $t.fo ../pdf/$t.pdf\n"))
{
die "test failed\n\n";
}
}