dati

A Go library/binary to parse & execute data against template langauges.
git clone git://src.gearsix.net/dati
Log | Files | Refs | Atom | README | LICENSE

dati_test.sh (542B)


      1 #!/usr/bin/env sh
      2 # if nothing prints, the test passed
      3 
      4 diff="diff -bs"
      5 fail=0
      6 
      7 go build -o dati dati.go
      8 
      9 if [ -e dati ]; then
     10 	./dati -cfg ../examples/dati.cfg -r ../examples/template/html.hmpl > out.html
     11 	$diff out.html ../examples/out.html
     12 	if [ $? -ne 0 ]; then fail=1; else rm out.html; fi
     13 
     14 	./dati -cfg ../examples/dati.cfg -r ../examples/template/txt.mst > out.txt
     15 	$diff out.txt ../examples/out.txt
     16 	if [ $? -ne 0 ]; then fail=1; else rm out.txt; fi
     17 
     18 	rm dati
     19 
     20 	if [ $fail -eq 1 ]; then echo "TEST FAIL"; else echo "TEST PASS"; fi
     21 fi