#
# Memory-Map Navigator overlay files (.mmo)
#
# reading version 22 (0x16)
gpsbabel -i mmo -f ${REFERENCE}/memory-map.mmo -o gpx -F ${TMPDIR}/memory-map~mmo.gpx
compare ${REFERENCE}/memory-map~mmo.gpx ${TMPDIR}/memory-map~mmo.gpx
# reading version 24 (0x18)
gpsbabel -i mmo -f ${REFERENCE}/memory-map_v24.mmo -o gpx -F ${TMPDIR}/memory-map_v24~mmo.gpx
compare ${REFERENCE}/memory-map_v24~mmo.gpx ${TMPDIR}/memory-map_v24~mmo.gpx
# writing (check only for memory leaks)
gpsbabel -i gpx -f ${REFERENCE}/memory-map~mmo.gpx -o mmo -F ${TMPDIR}/memory-map~mmo.mmo
gpsbabel -i mmo -f ${TMPDIR}/memory-map~mmo.mmo -o gpx -F ${TMPDIR}/memory-map~mmo~gpx.mmo

# we can only write version 17 (0x11) or 18 (0x12).
# we don't have a reference file from these versions, so we will create one and
# see if we can write it out without change.
gpsbabel -i mmo -f ${REFERENCE}/memory-map.mmo -o mmo -F ${TMPDIR}/memory-map.mmo
gpsbabel -i mmo -f ${TMPDIR}/memory-map.mmo -o mmo -F ${TMPDIR}/memory-map~mmo.mmo
bincompare ${TMPDIR}/memory-map.mmo ${TMPDIR}/memory-map~mmo.mmo
