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/parseko/foreachstmt06.stp | 12 ++++++++++++ testsuite/parseko/foreachstmt07.stp | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 testsuite/parseko/foreachstmt06.stp create mode 100755 testsuite/parseko/foreachstmt07.stp (limited to 'testsuite/parseko') diff --git a/testsuite/parseko/foreachstmt06.stp b/testsuite/parseko/foreachstmt06.stp new file mode 100755 index 00000000..43addb90 --- /dev/null +++ b/testsuite/parseko/foreachstmt06.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# missing expression after limit + +global array + +function decl() +{ + array[0] = 1 + foreach (key in array limit) + printf("key %d, value %d\n", key, array[key]) +} diff --git a/testsuite/parseko/foreachstmt07.stp b/testsuite/parseko/foreachstmt07.stp new file mode 100755 index 00000000..a7a9c9b9 --- /dev/null +++ b/testsuite/parseko/foreachstmt07.stp @@ -0,0 +1,12 @@ +#! stap -p1 + +# missing limit keyword but with an expression + +global array + +function decl() +{ + array[0] = 1 + foreach (key in array 5) + printf("key %d, value %d\n", key, array[key]) +} -- cgit