diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-04-09 15:42:10 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-04-09 16:25:12 -0700 |
commit | fa7241ac10bf9b47c3d20d557fdca0aa0a468484 (patch) | |
tree | 1186e8e6c13e0e452b07338d76de6603b055c316 /test/round-trip-test.in | |
parent | 7c4196d3218d1afa73c930577beeb579c1e87a38 (diff) |
test: add round-trip-test for atobm & bmtoa
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'test/round-trip-test.in')
-rw-r--r-- | test/round-trip-test.in | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/round-trip-test.in b/test/round-trip-test.in new file mode 100644 index 0000000..788ac2e --- /dev/null +++ b/test/round-trip-test.in @@ -0,0 +1,27 @@ +#! /bin/sh + +prefix="@prefix@" +builddir="@builddir@" +BITMAP_SRC="${srcdir}/bitmaps" +BITMAP_INC="@includedir@/X11/bitmaps" + +error_count=0 +for bm in ${BITMAP_SRC}/* ${BITMAP_INC}/* ; do + if [ -f ${bm} ] ; then + echo ${bm} + bmbase="$(basename ${bm})" + ${builddir}/bmtoa "${bm}" > bma.out + error_count=$(( error_count + $? )) + ${builddir}/atobm -name "${bmbase}" bma.out > abm.out + error_count=$(( error_count + $? )) + ${builddir}/bmtoa abm.out > bma.out.2 + error_count=$(( error_count + $? )) + cmp bma.out bma.out.2 + if [[ $? != 0 ]] ; then + exit 1 + fi + rm abm.out bma.out bma.out.2 + fi +done + +exit $error_count |