diff options
author | dsmith <dsmith> | 2006-11-06 16:18:18 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2006-11-06 16:18:18 +0000 |
commit | 9f6cfc6aa98476877444bf86e35c13bec9ae7080 (patch) | |
tree | 86bedc0b89af735dce2bd2d0b5c812d1f52b4899 /testsuite/semko/foreachstmt02.stp | |
parent | 27f21e8c049b0cd20fd2d4e2fd9b96cad6c910cc (diff) | |
download | systemtap-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/semko/foreachstmt02.stp')
-rwxr-xr-x | testsuite/semko/foreachstmt02.stp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/semko/foreachstmt02.stp b/testsuite/semko/foreachstmt02.stp new file mode 100755 index 00000000..49eea342 --- /dev/null +++ b/testsuite/semko/foreachstmt02.stp @@ -0,0 +1,17 @@ +#! stap -p2 + +# limit keyword with function returning a string expression + +global array + +function str_ret_type() +{ + return "hi" +} + +probe begin +{ + array[0] = 1 + foreach (key in array limit str_ret_type()) + printf("key %d, value %d\n", key, array[key]) +} |