#!/bin/sh

# Copyright (C) 2004, 2005 Simon Josefsson.
#
# This file is part of Base64.
#
# Base64 is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# Base64 is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Base64; see the file COPYING.  If not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.

BASE64=../src/base64
TMP=tmp.$$

out=`$BASE64 < Makefile > $TMP`
test "$?" != 0 &&
  echo "Test failed: $out" && exit 1

out=`$BASE64 -d < $TMP > $TMP.2`
test "$?" != 0 &&
  echo "Test decode failed: $out" && exit 1

cmp Makefile $TMP.2
test "$?" != 0 &&
  echo "Test compare failed" && exit 1

rm -f $TMP $TMP.2

exit 0
