# -*- tcl -*-
# Commands covered:  ascii85
#
# This file contains a collection of tests for one or more of the trf
# commands of the TRF extension. Sourcing this file into Tcl runs the
# tests and generates output for errors.  No output means no errors were
# found.
#
# Copyright (c) 1995 Andreas Kupries (a.kupries@westend.com)
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# $Id: ascii85.test,v 1.1 1997/07/22 20:32:49 aku Exp $

if {[string compare test [info procs test]] == 1} then {source defs}


foreach {index string fullencode encode} {
    1 flabbergast Ao(mb@V'Rm@<6M Ao(mb@V'Rm@<6M
} {
    test ascii85-3.$index {ascii85, encode string} {
	ascii85 -mode encode $string
    } $fullencode	;#{}

    test ascii85-4.$index {ascii85, decode string} {
	ascii85 -mode decode $encode
    } $string	;#{}

    # redundant tests following
    test ascii85-5.$index {ascii85, encode/decode identity} {
	ascii85 -mode decode [ascii85 -mode encode $string]
    } $string	;#{}

    test ascii85-6.$index {ascii85, decode/encode identity} {
	ascii85 -mode encode [ascii85 -mode decode $fullencode]
    } $fullencode	;#{}
}
