summaryrefslogtreecommitdiff
path: root/qa/240
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/240
downloadpcp-debian.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/240')
-rwxr-xr-xqa/240134
1 files changed, 134 insertions, 0 deletions
diff --git a/qa/240 b/qa/240
new file mode 100755
index 0000000..a5a7b87
--- /dev/null
+++ b/qa/240
@@ -0,0 +1,134 @@
+#! /bin/sh
+# PCP QA Test No. 240
+# pmnsmerge with nested cpp directives in the first arg
+#
+# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard filters
+. ./common.product
+. ./common.filter
+. ./common.check
+
+rm -f $seq.out
+if [ $PCP_VER -lt 3600 ]
+then
+ ln $seq.out.1 $seq.out || exit 1
+else
+ ln $seq.out.2 $seq.out || exit 1
+fi
+
+status=0
+trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+mkdir $tmp.dir
+cd $tmp.dir
+
+cat <<End-of-File >r0
+root {
+}
+End-of-File
+
+cat <<End-of-File >r1
+root {
+ foo
+ boo 1:2:3
+ eek
+}
+#include "r2"
+#include "r3"
+End-of-File
+
+cat <<End-of-File >r2
+#define FOO 1
+foo {
+ fumble FOO:2:1
+ bar
+}
+#include "r4"
+End-of-File
+
+cat <<End-of-File >r3
+eek {
+ stumble 1:2:4
+}
+End-of-File
+
+cat <<End-of-File >r4
+foo.bar {
+ mumble FOO:2:2
+}
+End-of-File
+
+cat <<End-of-File >r5
+root {
+ root_ 2:2:0
+ surprise
+ foo
+ eek
+}
+#include "r6"
+End-of-File
+
+cat <<End-of-File >r6
+#undef FOO
+#define FOO 2
+foo {
+ foo_ FOO:2:1
+ bar
+}
+foo.bar {
+ foobar_ FOO:2:2
+ xtra
+}
+eek {
+ eek_ FOO:2:3
+}
+surprise {
+ s1_ FOO:3:1
+ s2_ FOO:3:2
+}
+foo.bar.xtra {
+ x1_ FOO:4:1
+ x2_ FOO:4:2
+}
+End-of-File
+
+echo "-- null --"
+rm -f out-pmns
+pmnsmerge r0 out-pmns
+cat out-pmns
+pminfo -n out-pmns -m | sort
+
+echo
+echo "-- r1 --"
+pminfo -n r1 -m | sort
+
+echo
+echo "-- r5 --"
+pminfo -n r5 -m | sort
+
+echo
+echo "-- null + r1 --"
+rm -f out-pmns
+pmnsmerge r0 r1 out-pmns
+cat out-pmns
+pminfo -n out-pmns -m | sort
+
+echo
+echo "-- null + r1 + r5 --"
+rm -f out-pmns
+pmnsmerge r0 r1 r5 out-pmns
+cat out-pmns
+pminfo -n out-pmns -m | sort
+
+echo
+echo "-- r1 + r5 --"
+rm -f out-pmns
+pmnsmerge r1 r5 out-pmns
+cat out-pmns
+pminfo -n out-pmns -m | sort