Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 357
blobafdd510e9304e63bf7dbe1e547f5087f0559106d
1 #! /bin/sh
2 # PCP QA Test No. 357
3 # Exercise __pmNumberStr()
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=1 # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 for i in \
20 0.4321 4.321 43.21 432.1 4321 43210 \
21 0 \
22 0.00001 0.0001 0.001 0.01 0.1 1.0 10.0 100.0 1000.0 10000.0 \
23 1000000.0 10000000.0 100000000.0 1000000000.0 10000000000.0 \
24 100000000000.0 1000000000000.0 10000000000000.0 \
25 0.005 0.0051 \
26 9.995 9.9951 \
27 99.995 99.9951 \
28 999.95 999.951 \
29 999995 9999951 \
30 9999500 99995100 \
31 99995000 999951000 \
32 999950000 9999510000 \
33 9999500000 99995100000 \
34 99995000000 999951000000 \
35 999950000000 9999510000000 \
36 9999500000000 99995100000000 \
37 99995000000000 999951000000000 \
38 999950000000000 9999510000000000 \
39 9999500000000000 99995100000000000
41 echo $i | $PCP_AWK_PROG '{printf("%18s = ", $1); }'
42 src/numberstr $i
43 echo -$i | $PCP_AWK_PROG '{printf("%18s = ", $1); }'
44 src/numberstr -$i
45 done
47 # success, all done
48 status=0
49 exit