# -*- tcl -*-
# Commands covered:	common behaviour of all conversions.
#
# 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 (andreas_kupries@users.sourceforge.net)
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# $Id: common_conv.test,v 1.2 2000/11/18 22:42:32 aku Exp $

# conversions: bin, hex, oct, base64, uuencode, ascii85

foreach c {
    bin
    hex
    oct
    base64
    uuencode
    ascii85
} {
    test $c-1.0 "$c, argument errors" {
	catch {$c XXX} msg;    set msg
    } {-mode option not set}

    test $c-1.1 "$c, argument errors" {
	catch {$c -mode} msg;    set msg
    } "$c: wrong # args, all options require an argument"

    test $c-1.2 "$c, argument errors" {
	catch {$c -x x} msg;    set msg
    } {unknown option '-x', should be '-mode'}

    test $c-1.3 "$c, argument errors" {
	catch {$c -m x} msg;    set msg
    } {unknown mode 'x', should be 'encode' or 'decode'}
}


::tcltest::cleanupTests
