summaryrefslogtreecommitdiff
path: root/test/source/test/strfnd.i
blob: a85f2278883ac8fcb2ce956362d50b3ebd55a45f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdbool.h>

static bool zaptest_test_strfnd(void) {
	char const str[] = "What the drake doing?";
	zap_sz pos = zap_strfnd(str,'?');
	zaptest_chk(pos,0x14u,zap_sz,"%zX");
	pos = zap_strfnd(str,'t');
	zaptest_chk(pos,0x3u,zap_sz,"%zX");
	pos = zap_strfnd(str,'!');
	zaptest_chk(pos,zap_nopos,zap_sz,"%zX");
	return false;
}