From 727d33a0728a633371ce8d1e9b5a791d9c45d6fb Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 20 Jun 2007 21:42:39 +0000 Subject: 2007-06-20 Martin Hunt * systemtap.string/dot.exp: New test. * systemtap.string/sprint.exp: New test. --- testsuite/systemtap.string/dot.stp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 testsuite/systemtap.string/dot.stp (limited to 'testsuite/systemtap.string/dot.stp') diff --git a/testsuite/systemtap.string/dot.stp b/testsuite/systemtap.string/dot.stp new file mode 100644 index 00000000..94d9c97e --- /dev/null +++ b/testsuite/systemtap.string/dot.stp @@ -0,0 +1,23 @@ +# Test of "." concatenation operator +# +# Use of this function is probably never a good idea +# and is discouraged. Nevertheless, we still support it. + +probe begin { + a = "hello" + b = "world" + c = "" + + x = a.b + y = a.b.c + + print(x . "\n") + print(y . "\n") + if (x == y) print("EQUAL\n") + if (x == a.b) print("EQUAL\n") + + z = a."-".b." ". x . " FOO " . y . "\n" + print(z) + + exit() +} -- cgit