#
# IGC tests
#
rm -f ${TMPDIR}/igc*out
gpsbabel -i gpx -f ${REFERENCE}/igc1.gpx -o igc -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed.out
compare ${REFERENCE}/igc1_igc.out ${TMPDIR}/igc_sed.out

gpsbabel -i igc -f ${TMPDIR}/igc.out -o gpx -F ${TMPDIR}/igc.gpx
compare ${REFERENCE}/igc1_gpx.out ${TMPDIR}/igc.gpx

gpsbabel -i gpx -f ${TMPDIR}/igc.gpx -o igc -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed2.out
compare ${REFERENCE}/igc1_igc.out ${TMPDIR}/igc_sed2.out

gpsbabel -i gpx -f ${REFERENCE}/igc1_baro.gpx -i igc -f ${REFERENCE}/igc1_igc.out -o igc,timeadj=auto -F ${TMPDIR}/igc.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc.out > ${TMPDIR}/igc_sed3.out
compare ${REFERENCE}/igc1_3d.out ${TMPDIR}/igc_sed3.out


gpsbabel -i igc -f ${REFERENCE}/igc2.igc -o gpx -F ${TMPDIR}/igc2~igc.gpx
compare ${REFERENCE}/igc2_gpx.out ${TMPDIR}/igc2~igc.gpx

gpsbabel -i gpx -f ${TMPDIR}/igc2~igc.gpx -o igc -F ${TMPDIR}/igc2~igc~gpx.out
sed '/^LXXXGenerated by GPSBabel Version/d' ${TMPDIR}/igc2~igc~gpx.out > ${TMPDIR}/igc2~igc~gpx_sed.out
compare ${REFERENCE}/igc2_igc.out ${TMPDIR}/igc2~igc~gpx_sed.out

gpsbabel -i igc -f ${TMPDIR}/igc2~igc~gpx.out -o gpx -F ${TMPDIR}/igc2~igc~gpx~igc.gpx
compare ${REFERENCE}/igc2_gpx.out ${TMPDIR}/igc2~igc~gpx~igc.gpx
