1#!/bin/sh
2#	$OpenBSD: runparse.sh,v 1.1 2018/07/09 09:03:29 mpi Exp $	
3
4run() {
5    for i in $* ; do
6	./parsetest $(echo "ibase=16; $i" | bc)
7	if [ $? -ne 0 ]
8	then
9	    printf "\nFailed on 0x%s\n" "$i"
10	    return 1
11	fi
12	printf " $i"
13    done
14    printf "\n"
15    return 0
16}
17
18case $1 in
19    hex)
20	printf "Unable to handle %%x format names - DISABLED\n"
21	# run $2
22	exit 0 ;;
23    dec)
24	printf "Testing %%d & %%u format names"
25	run $2
26	exit $? ;;
27    static)
28	printf "Testing staticly named usage names"
29	run $2
30	exit $? ;;
31esac
32
33