// SPDX-License-Identifier: GPL-3.0-or-later

#include <dfm-io/dfmio_utils.h>
#include <dfm-mount/base/dmount_global.h>
#include <dfm-burn/dburn_global.h>
#include <dfm-search/dsearch_global.h>

#include <QCoreApplication>
#include <QStringList>

#include <cstdio>

int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);

    const QStringList dirs = DFMIO::DFMUtils::systemDataDirs();
    if (dirs.isEmpty()) {
        std::fprintf(stderr, "DFMUtils::systemDataDirs() returned nothing\n");
        return 1;
    }
    std::printf("system data dirs: %s\n", qUtf8Printable(dirs.join(QLatin1Char(':'))));

    const QString path = DFMIO::DFMUtils::buildFilePath("/", "tmp", (const char *)nullptr);
    if (path != QLatin1String("/tmp")) {
        std::fprintf(stderr, "DFMUtils::buildFilePath() returned '%s'\n", qUtf8Printable(path));
        return 1;
    }

    return 0;
}
