1168754Sbushman#!/bin/sh 2168754Sbushman# $FreeBSD$ 3168754Sbushman 4168754Sbushmando_test() { 5168754Sbushman number=$1 6168754Sbushman comment=$2 7168754Sbushman opt=$3 8168754Sbushman if ./$executable $opt; then 9168754Sbushman echo "ok $number - $comment" 10168754Sbushman else 11168754Sbushman echo "not ok $number - $comment" 12168754Sbushman fi 13168754Sbushman} 14168754Sbushman 15168754Sbushmancd `dirname $0` 16168754Sbushman 17168754Sbushmanexecutable=`basename $0 .t` 18168754Sbushman 19168754Sbushmanmake $executable 2>&1 > /dev/null 20168754Sbushman 21168754Sbushmanecho 1..8 22168754Sbushmando_test 1 'getrpcbyname()' '-n' 23168754Sbushmando_test 2 'getrpcbynumber()' '-v' 24168754Sbushmando_test 3 'getrpcent()' '-e' 25168754Sbushmando_test 4 'getrpcent() 2-pass' '-2' 26168754Sbushmando_test 5 'building snapshot, if needed' '-s snapshot_rpc' 27168754Sbushmando_test 6 'getrpcbyname() snapshot' '-n -s snapshot_rpc' 28168754Sbushmando_test 7 'getrpcbynumber() snapshot' '-v -s snapshot_rpc' 29168754Sbushmando_test 8 'getrpcent() snapshot' '-e -s snapshot_rpc' 30