598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#! /usr/bin/ksh
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# This file and its contents are supplied under the terms of the
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# Common Development and Distribution License ("CDDL"), version 1.0.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# You may only use this file in accordance with the terms of version
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# 1.0 of the CDDL.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# A full copy of the text of the CDDL should have accompanied this
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# source. A copy of the CDDL is also available via the Internet at
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# http://www.illumos.org/license/CDDL.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmorePRINTF=${PRINTF:=/usr/bin/printf}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretest_start() {
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore print "TEST STARTING ${1}: ${2}"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretest_pass() {
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore print "TEST PASS: ${1}"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretest_fail() {
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore print "TEST FAIL: ${1}: ${2}"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore exit -1
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amorecheckrv() {
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore if [[ $? -ne 0 ]]; then
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore test_fail $1 "exit failure"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore fi
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amorecompare() {
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore if [[ "$2" != "$3" ]]; then
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore test_fail $1 "compare mismatch, got [$2] expected [$3]"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore fi
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[01]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[01][desc]="hexadecimal lowercase"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[01][format]='%04x'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[01][args]="255"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[01][result]="00ff"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[02]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[02][desc]="hexadecimal 32-bit"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[02][format]='%08x'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[02][args]='65537'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[02][result]=00010001
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[03]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[03][desc]="multiple arguments"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[03][format]='%d %s '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[03][args]="1 one 2 two 3 three"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[03][result]='1 one 2 two 3 three '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[04]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[04][desc]="variable position parameters"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[04][format]='%2$s %1$d '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[04][args]="1 one 2 two 3 three"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[04][result]='one 1 two 2 three 3 '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[05]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[05][desc]="width"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[05][format]='%10s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[05][args]="abcdef"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[05][result]=' abcdef'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[06]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[06][desc]="width and precision"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[06][format]='%10.3s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[06][args]="abcdef"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[06][result]=' abc'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[07]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[07][desc]="variable width and precision"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[07][format]='%*.*s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[07][args]="10 3 abcdef"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[07][result]=' abc'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[08]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[08][desc]="variable position width and precision"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[08][format]='%2$*1$.*3$s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[08][args]="10 abcdef 3"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[08][result]=' abc'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[09]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[09][desc]="multi variable position width and precision"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[09][format]='%2$*1$.*3$s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[09][args]="10 abcdef 3 5 xyz 1"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[09][result]=' abc x'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[10]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[10][desc]="decimal from hex"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[10][format]='%d '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[10][args]="0x1000 0XA"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[10][result]='4096 10 '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[11]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[11][desc]="negative dec (64-bit)"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[11][format]='%x'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[11][args]="-1"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[11][result]='ffffffffffffffff'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[12]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][desc]="float (basic)"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][format]='%f'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][args]="3.14"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][result]='3.140000'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[12]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][desc]="float precision"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][format]='%.2f'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][args]="3.14159"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[12][result]='3.14'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[13]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[13][desc]="left justify"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[13][format]='%-5d'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[13][args]="45"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[13][result]='45 '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[14]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[14][desc]="newlines"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[14][format]='%s\n%s\n%s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[14][args]="one two three"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[14][result]='one
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretwo
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amorethree'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[15]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[15][desc]="embedded octal escape"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[15][format]='%s\41%s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[15][args]="one two"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[15][result]='one!two'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[16]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[16][desc]="backslash string (%b)"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[16][format]='%b'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[16][args]='\0101\0102\0103'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[16][result]='ABC'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[17]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[17][desc]="backslash c in %b"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[17][format]='%b%s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[17][args]='\0101\cone two'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[17][result]='A'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[18]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[18][desc]="backslash octal in format"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[18][format]='HI\1120K\0112tabbed\11again'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[18][args]=
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[18][result]='HIJ0K 2tabbed again'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[19]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[19][desc]="backslash octal in %b"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[19][format]="%b"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[19][args]='HI\0112K\011tabbed'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[19][result]='HIJK tabbed'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[20]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[20][desc]="numeric %d and ASCII conversions"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[20][format]='%d '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[20][args]="3 +3 -3 \"3 \"+ '-"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[20][result]='3 3 -3 51 43 45 '
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretypeset -A tests[21]=()
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[21][desc]="verify second arg only"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[21][format]='%2$s'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[21][args]='abc xyz'
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoretests[21][result]="xyz"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretypeset -A tests[22]=()
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[22][desc]="verify missing signed arg"
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[22][format]='%d %d'
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[22][args]='151'
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[22][result]="151 0"
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amore
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretypeset -A tests[23]=()
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[23][desc]="verify missing unsigned arg"
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[23][format]='%u %u'
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[23][args]='151'
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amoretests[23][result]="151 0"
e56bd28502ece54c39ad86fd96643790902bb93eGarrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore#debug=yes
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amorefor i in "${!tests[@]}"; do
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore t=test_$i
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore desc=${tests[$i][desc]}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore format=${tests[$i][format]}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore args="${tests[$i][args]}"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore result=${tests[$i][result]}
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore test_start $t "${tests[$i][desc]}"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore [[ -n "$debug" ]] && echo $PRINTF "$format" "${args[@]}"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore comp=$($PRINTF "$format" ${args[@]})
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore checkrv $t
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore [[ -n "$debug" ]] && echo "got [$comp]"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore good=$result
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore compare $t "$comp" "$good"
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore test_pass $t
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoredone