diff options
Diffstat (limited to 'testsuite/parseko')
-rwxr-xr-x | testsuite/parseko/foreachstmt06.stp | 12 | ||||
-rwxr-xr-x | testsuite/parseko/foreachstmt07.stp | 12 |
2 files changed, 24 insertions, 0 deletions
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]) +} |