From fc98aa95b304065ebbf8beb77699d7b686591259 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 21 Aug 2006 16:39:35 +0000 Subject: New tests for string functions. --- testsuite/systemtap.string/strlen.stp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 testsuite/systemtap.string/strlen.stp (limited to 'testsuite/systemtap.string/strlen.stp') diff --git a/testsuite/systemtap.string/strlen.stp b/testsuite/systemtap.string/strlen.stp new file mode 100644 index 00000000..028cf004 --- /dev/null +++ b/testsuite/systemtap.string/strlen.stp @@ -0,0 +1,15 @@ +probe begin +{ + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + a = "1" + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + a = "0123456789" + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + a = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + exit() +} -- cgit