diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/buildok/twentyone.stp | 27 | ||||
-rwxr-xr-x | testsuite/parseko/fifteen.stp | 6 | ||||
-rwxr-xr-x | testsuite/parseko/fourteen.stp | 2 | ||||
-rwxr-xr-x | testsuite/parseok/thirteen.stp | 8 |
4 files changed, 42 insertions, 1 deletions
diff --git a/testsuite/buildok/twentyone.stp b/testsuite/buildok/twentyone.stp new file mode 100755 index 00000000..052c3a17 --- /dev/null +++ b/testsuite/buildok/twentyone.stp @@ -0,0 +1,27 @@ +#! stap -p4 + +global a + +probe begin { + a[5] = 0 + a[4] = 2 + a[3] = 5 + a[2] = 8 + a[1] = 1 + a[0] = -4 + exit () +} + +probe end { + log ("x+ in a") + foreach (x+ in a) log ("a[" . string(x) . "]=" . string(a[x])) + + log ("x- in a") + foreach (x- in a) log ("a[" . string(x) . "]=" . string(a[x])) + + log ("x in a+") + foreach (x in a+) log ("a[" . string(x) . "]=" . string(a[x])) + + log ("x in a-") + foreach (x in a-) log ("a[" . string(x) . "]=" . string(a[x])) +} diff --git a/testsuite/parseko/fifteen.stp b/testsuite/parseko/fifteen.stp new file mode 100755 index 00000000..35208740 --- /dev/null +++ b/testsuite/parseko/fifteen.stp @@ -0,0 +1,6 @@ +#! stap -p1 + +probe begin +{ + foreach ([x+,y-] in a) {} +} diff --git a/testsuite/parseko/fourteen.stp b/testsuite/parseko/fourteen.stp index b646f8b6..32a8979a 100755 --- a/testsuite/parseko/fourteen.stp +++ b/testsuite/parseko/fourteen.stp @@ -1,4 +1,4 @@ -#! stap -p2 +#! stap -p1 function zoo () %{ /* invalid embedded code */ %} diff --git a/testsuite/parseok/thirteen.stp b/testsuite/parseok/thirteen.stp new file mode 100755 index 00000000..7c8c5d4b --- /dev/null +++ b/testsuite/parseok/thirteen.stp @@ -0,0 +1,8 @@ +#! stap -p1 + +probe one +{ + foreach ([x+,y] in a) ; + foreach ([x,y-] in a) ; + foreach ([x,y] in a+) ; +} |