コード例 #1
0
ファイル: testmod_glob.c プロジェクト: reox/libelektra
void test_setGlobalMatch (void)
{
	Key * parentKey = keyNew ("user/tests/glob", KEY_END);
	// clang-format off
	KeySet *conf = ksNew (20,
			keyNew ("user/glob/#1", KEY_VALUE, "/*",
					KEY_META, "testmetakey1", "testvalue1",
					KEY_META, "testmetakey2", "testvalue2",
					KEY_END),
			KS_END);
	// clang-format on
	PLUGIN_OPEN ("glob");

	KeySet * ks = createKeys ();

	succeed_if (plugin->kdbSet (plugin, ks, parentKey) >= 1, "call to kdbSet was not successful");
	succeed_if (output_error (parentKey), "error in kdbSet");
	succeed_if (output_warnings (parentKey), "warnings in kdbSet");

	testKeys (ks);
	ksDel (ks);
	keyDel (parentKey);

	PLUGIN_CLOSE ();
}
コード例 #2
0
ファイル: test_message.c プロジェクト: Gratski/SD_Projecto_2
int main() {
	int score = 0;

	printf("\nIniciando o teste do módulo message\n");

	score += testResult();

	score += testKey();

	score += testValue();

	score += testEntry();

	score += testKeys();

	score += testInvalida();

	printf("Resultados do teste do módulo message: %d em 6\n\n",score);

	return score;
}