From 9f6cfc6aa98476877444bf86e35c13bec9ae7080 Mon Sep 17 00:00:00 2001 From: dsmith Date: Mon, 6 Nov 2006 16:18:18 +0000 Subject: 2006-11-06 David Smith * 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. --- testsuite/semko/foreachstmt02.stp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 testsuite/semko/foreachstmt02.stp (limited to 'testsuite/semko/foreachstmt02.stp') 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]) +} -- cgit