diff options
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]) +} |