Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 021
blob44e8a5e56ebcea698790b2e74f7456693f0d01f3
1 #! /bin/sh
2 # PCP QA Test No. 021
3 # test pmgenmap handling of comments
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 _strip()
10 $PCP_AWK_PROG '
11 /Built/ { print; name = 1; next }
12 name == 1 { print "<filename goes in here>"; name = 0; date = 1; next }
13 date == 1 { print "<date goes in here>"; date = 0; next }
14 { print }'
17 seq=`basename $0`
18 echo "QA output created by $seq"
20 # get standard filters
21 . ./common.product
22 . ./common.filter
24 trap "rm -f $tmp.*; exit 0" 0 1 2 3 15
26 # real QA test starts here
27 cat <<End-of-File >$tmp.spec
28 # leading single line comment
29 foo {
30 a.b.c ONE
31 d.e.f.g TWO
32 # embedded single line comment
33 xx.yy.zz THREE
35 # trailing block of
36 # multi-lines
37 # comments
38 End-of-File
40 pmgenmap $tmp.spec | _strip
42 cat <<End-of-File >$tmp.spec
43 # leading block of
44 # multi-lines
45 # comments
46 foo {
47 a.b.c ONE
48 d.e.f.g TWO
49 # embedded block of multi-lines
50 # comments and boring pad text
51 xx.yy.zz THREE
53 # trailing single line comment
54 End-of-File
56 pmgenmap $tmp.spec | _strip