]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
tests: util: The base64 functions are anchored to the context now
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Nov 2023 14:34:57 +0000 (14:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Nov 2023 14:34:57 +0000 (14:34 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/util.c

index 3ee6492a58ec6c9505ce8a2bd1448a57ae75dded..ca9fde5a72ff64c524a6cedf08b3a35293ad1b12 100644 (file)
@@ -95,13 +95,13 @@ static int test_base64(const struct test* t) {
        size_t length = 0;
 
        // Encode data as base64
-       ASSERT_SUCCESS(pakfire_b64encode(t->pakfire, &base64, data, sizeof(data)));
+       ASSERT_SUCCESS(pakfire_b64encode(t->ctx, &base64, data, sizeof(data)));
 
        // Print the encoded data
        printf("%s\n", base64);
 
        // Decode the data
-       ASSERT_SUCCESS(pakfire_b64decode(t->pakfire, &output, &length, base64));
+       ASSERT_SUCCESS(pakfire_b64decode(t->ctx, &output, &length, base64));
 
        // Print the decoded data
        printf("%.*s\n", length, output);
@@ -124,8 +124,8 @@ FAIL:
 
 int main(int argc, const char* argv[]) {
        testsuite_add_test(test_mkdir, TEST_WANTS_PAKFIRE);
-       testsuite_add_test(test_path_match, TEST_WANTS_PAKFIRE);
-       testsuite_add_test(test_base64, TEST_WANTS_PAKFIRE);
+       testsuite_add_test(test_path_match, 0);
+       testsuite_add_test(test_base64, 0);
 
        return testsuite_run(argc, argv);
 }