facf0c92e0
Red Bear OS is a full fork. All sources must be available from git clone with zero network access. Removed gitignore rules that excluded fetched source trees under recipes/*/source/, local/recipes/kde/*/source/, local/recipes/qt/*/source/, and vendor source trees. Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded. 127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt frameworks, mesa, wayland, DRM drivers, and every other recipe source.
52 lines
1.5 KiB
C
52 lines
1.5 KiB
C
/**
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
* SPDX-FileCopyrightText: 2025 Marco Trevisan (Treviño)
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <gio/gio.h>
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
const char *envvar;
|
|
const char *document_portal_mount;
|
|
char *expected;
|
|
char *expected_files[3] = {0};
|
|
gint pid_from_env;
|
|
|
|
g_test_init (&argc, &argv, NULL);
|
|
|
|
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
|
|
g_assert_nonnull (envvar);
|
|
|
|
expected = g_test_build_filename (G_TEST_BUILT, "snap-app_appinfo-test.desktop", NULL);
|
|
g_assert_cmpstr (envvar, ==, expected);
|
|
g_free (expected);
|
|
|
|
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
|
|
g_assert (envvar != NULL);
|
|
pid_from_env = atoi (envvar);
|
|
g_assert_cmpint (pid_from_env, ==, getpid ());
|
|
|
|
document_portal_mount = g_getenv ("DOCUMENT_PORTAL_MOUNT_POINT");
|
|
g_assert_nonnull (document_portal_mount);
|
|
|
|
expected_files[0] = g_build_filename (document_portal_mount,
|
|
"document-id-0", "snap-app_appinfo-test.desktop",
|
|
NULL);
|
|
expected_files[1] = g_build_filename (document_portal_mount,
|
|
"document-id-1", "appinfo-test.desktop",
|
|
NULL);
|
|
|
|
g_assert_cmpint (argc, ==, 3);
|
|
|
|
for (size_t i = 0; i < G_N_ELEMENTS (expected_files); ++i)
|
|
{
|
|
g_assert_cmpstr (argv[i+1], ==, expected_files[i]);
|
|
g_clear_pointer (&expected_files[i], g_free);
|
|
}
|
|
|
|
return 0;
|
|
}
|