xref: /openbsd-src/regress/usr.sbin/btrace/str.bt (revision 8420ddd22163c7b6d4286d461c57d5edee71f410)
1/* Tests for str() */
2BEGIN {
3      /* Should pass through regular string args */
4      printf("%s %s %s\n", $1, $2, str($3));
5
6      /* Should truncate when given an index < the max (currently 64) */
7      printf("%sSSH %s %s\n", str($1, $4), $2, $3);
8
9      /* Should truncate long arguments to STRLEN bytes */
10      printf("No 3 please: %s\n", str($6));
11
12      /* Should support nested expressions for the index */
13      print(str($1, 2 + 2));
14      print(str($1, 2 + $7));
15}
16