diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/buildok/twelve.stp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/buildok/twelve.stp b/testsuite/buildok/twelve.stp new file mode 100755 index 00000000..f30e0813 --- /dev/null +++ b/testsuite/buildok/twelve.stp @@ -0,0 +1,31 @@ +#! stap -p4 + +# testing the "in" operator + +global foo, goo, moo + +probe begin +{ + foo[10] = "a" + goo["a",12,"c",14,"d"] = 10 + moo[1,2,3,4,5] = "hello" + + if (10 in foo) + { + foo[10] = "yes" + } + + if (["a",12,"c",14,"d"] in goo) + { + goo["p",1,"q",2,"r"] += (12 in foo) + } + + x = 1 + y = 2 + z = 3 + + if ([x,y,z,y,x] in moo) + { + foo[30] = moo[(x in foo), (y in foo), (z in foo), (y in foo), (x in foo)] + } +} |