# These outputs will change with any new format or changed format option.
# Format options should be automatically handled by the GUI.
# These outputs will change with any new filter or changed filter option.
# Filter options must be hand coded in the GUI.
#
# These are primarily meant to serialize the interface specification to
# the GUI and the document.
# We do a compare_nole as specific whitespace is part of deserialization.
gpsbabel -^3 > ${TMPDIR}/format3.txt
sed 's,https://www.gpsbabel.org/htmldoc-.[^/]*/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt
compare_nole ${REFERENCE}/format3.txt ${TMPDIR}/format3.fiddled.txt
gpsbabel -^2 > ${TMPDIR}/format2.txt
compare_nole ${REFERENCE}/format2.txt ${TMPDIR}/format2.txt
gpsbabel -^1 > ${TMPDIR}/format1.txt
compare_nole ${REFERENCE}/format1.txt ${TMPDIR}/format1.txt
gpsbabel -^0 > ${TMPDIR}/format0.txt
compare_nole ${REFERENCE}/format0.txt ${TMPDIR}/format0.txt
gpsbabel -%1 > ${TMPDIR}/filter1.txt
sed 's,https://www.gpsbabel.org/htmldoc-.[^/]*/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt
compare_nole ${REFERENCE}/filter1.txt ${TMPDIR}/filter1.fiddled.txt
gpsbabel -%0 > ${TMPDIR}/filter0.txt
compare_nole ${REFERENCE}/filter0.txt ${TMPDIR}/filter0.txt

# These are primarily meant for a user
gpsbabel -h > ${TMPDIR}/help.txt
# ahh shucks, the executable changes based on OS, and the path can change as well.
sed 's/.*\[options\]/    .\/gpsbabel [options]/' ${TMPDIR}/help.txt > ${TMPDIR}/help.stripped.txt
compare ${REFERENCE}/help.txt ${TMPDIR}/help.stripped.txt
gpsbabel -h gpx > ${TMPDIR}/formatusage.txt
compare ${REFERENCE}/formatusage.txt ${TMPDIR}/formatusage.txt
gpsbabel -h radius > ${TMPDIR}/filterusage.txt
compare ${REFERENCE}/filterusage.txt ${TMPDIR}/filterusage.txt
gpsbabel > ${TMPDIR}/usage.txt << EOJ

EOJ
# ahh shucks, the executable changes based on OS, and the path can change as well.
sed 's/.*\[options\]/    .\/gpsbabel [options]/' ${TMPDIR}/usage.txt > ${TMPDIR}/usage.stripped.txt
compare ${REFERENCE}/usage.txt ${TMPDIR}/usage.stripped.txt
