summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.string/sprint.stp
blob: 30f2f854df02f56c9f2ec5a81c838962d52bd384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Test of sprint() to 
#
# 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 = sprint(12345678)
	print(sprint(a) . "\n")
	print(sprint(a.b) . "\n")
	print(c . "\n")
	print(sprint(0) . "\n")
	print(sprint(100) . "\n")
	print(sprint(-42) . "\n")
	print(sprint(0x42) . "\n")

	exit()
}