summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog8
-rwxr-xr-xtestsuite/parseko/preprocess10.stp4
-rwxr-xr-xtestsuite/parseko/preprocess11.stp4
-rwxr-xr-xtestsuite/parseko/preprocess12.stp5
-rwxr-xr-xtestsuite/parseok/fourteen.stp11
5 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index bf9bfae6..df1144c5 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2007-04-04 Pierre Peiffer <pierre.peiffer@bull.net>
+
+ * parseok/fourteen.stp: Add test about $# and @# usage during
+ the preprocessing.
+ * parseko/preprocess10.stp: New test.
+ * parseko/preprocess11.stp: New test.
+ * parseko/preprocess12.stp: New test.
+
2007-04-02 Frank Ch. Eigler <fche@elastic.org>
* systemtap.samples/poll_map.stp, profile.stp, syscalls.stp:
diff --git a/testsuite/parseko/preprocess10.stp b/testsuite/parseko/preprocess10.stp
new file mode 100755
index 00000000..5fcb7e9f
--- /dev/null
+++ b/testsuite/parseko/preprocess10.stp
@@ -0,0 +1,4 @@
+#! stap -p1
+
+# expected number as right value in comparison
+%( $# != "2" %? probe begin { } %)
diff --git a/testsuite/parseko/preprocess11.stp b/testsuite/parseko/preprocess11.stp
new file mode 100755
index 00000000..586aec1a
--- /dev/null
+++ b/testsuite/parseko/preprocess11.stp
@@ -0,0 +1,4 @@
+#! stap -p1
+
+# expected string as right value in comparison
+%( @# != 2 %? probe begin { } %)
diff --git a/testsuite/parseko/preprocess12.stp b/testsuite/parseko/preprocess12.stp
new file mode 100755
index 00000000..3ff3e34e
--- /dev/null
+++ b/testsuite/parseko/preprocess12.stp
@@ -0,0 +1,5 @@
+#! stap -p1
+
+# command line argument index invalid or out of range
+# (try to access to an unavailable argument)
+%( $# < 2 %? probe begin { print @1 } %)
diff --git a/testsuite/parseok/fourteen.stp b/testsuite/parseok/fourteen.stp
index cc51b90b..30ada648 100755
--- a/testsuite/parseok/fourteen.stp
+++ b/testsuite/parseok/fourteen.stp
@@ -15,3 +15,14 @@ global
%: %( arch != "x86_64" %? other %: x86_64 %)
%)
%)
+
+global
+%( $# != 2 %? /* and */
+ %( @# < "1" %? /* and */
+ %( @# == "0" %? /* and */
+ %( $# >= 3 %? /* and */
+ %( $2 >= "12" %? $3 FAIL5 %: $2 FAIL6 %) #This line must not be evaluated
+ %: PASS2 %)
+ %: "FAIL7" %)
+ %: "FAIL8" %)
+%: "FAIL9" %)