testsuite/systemtap.string/dot.stp
raw| 1 | # Test of "." concatenation operator |
| 2 | # |
| 3 | # Use of this function is probably never a good idea |
| 4 | # and is discouraged. Nevertheless, we still support it. |
| 5 | |
| 6 | probe begin { |
| 7 | a = "hello" |
| 8 | b = "world" |
| 9 | c = "" |
| 10 | |
| 11 | x = a.b |
| 12 | y = a.b.c |
| 13 | |
| 14 | print(x . "\n") |
| 15 | print(y . "\n") |
| 16 | if (x == y) print("EQUAL\n") |
| 17 | if (x == a.b) print("EQUAL\n") |
| 18 | |
| 19 | z = a."-".b." ". x . " FOO " . y . "\n" |
| 20 | print(z) |
| 21 | |
| 22 | exit() |
| 23 | } |