summaryrefslogtreecommitdiff
path: root/test/test-endswith.c
blob: 7ad61a7c8e7a8a1a832fd714f28398b7dace9236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include "string_common.h"

int main() {
	int r, result1, result2;
	char *foo = "this is a string";
	char *bar = "string";

	result1 = endswith(foo, bar);
	result2 = endswith("string", "asdf");

	r = (result1 == 1) && (result2 == 0);

	printf("%s: endswith\n", r ? "PASS" : "FAIL");

	return r;
}