summaryrefslogtreecommitdiffstats
path: root/testsuite/parseok/foreachstmt01.stp
diff options
context:
space:
mode:
authordsmith <dsmith>2006-11-06 16:18:18 +0000
committerdsmith <dsmith>2006-11-06 16:18:18 +0000
commit9f6cfc6aa98476877444bf86e35c13bec9ae7080 (patch)
tree86bedc0b89af735dce2bd2d0b5c812d1f52b4899 /testsuite/parseok/foreachstmt01.stp
parent27f21e8c049b0cd20fd2d4e2fd9b96cad6c910cc (diff)
downloadsystemtap-steved-9f6cfc6aa98476877444bf86e35c13bec9ae7080.tar.gz
systemtap-steved-9f6cfc6aa98476877444bf86e35c13bec9ae7080.tar.xz
systemtap-steved-9f6cfc6aa98476877444bf86e35c13bec9ae7080.zip
2006-11-06 David Smith <dsmith@redhat.com>
* parseko/foreachstmt06.stp: Added new test for foreach "limit" keyword. * parseko/foreachstmt07.stp: Ditto. * parseok/foreachstmt01.stp: Ditto. * semko/foreachstmt01.stp: Ditto. * semko/foreachstmt02.stp: Ditto.
Diffstat (limited to 'testsuite/parseok/foreachstmt01.stp')
-rwxr-xr-xtestsuite/parseok/foreachstmt01.stp10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/parseok/foreachstmt01.stp b/testsuite/parseok/foreachstmt01.stp
new file mode 100755
index 00000000..2b306474
--- /dev/null
+++ b/testsuite/parseok/foreachstmt01.stp
@@ -0,0 +1,10 @@
+#! stap -p1
+
+probe one
+{
+ foreach ([x+,y] in a limit 5) ;
+ n = 5 ;
+ foreach ([x,y-] in a limit n) ;
+ foreach ([x,y] in a+ limit n + 2) ;
+ foreach ([x,y] in a+ limit ++n) ;
+}