#include "catch2/catch.hpp"
#include "cetlib/detail/plugin_search_path.h"
#include "cetlib/getenv.h"
#include "cetlib/os_libpath.h"
#include "cetlib/plugin_libpath.h"
#include "cetlib/search_path.h"
#include "cetlib/split_path.h"
#include <cstdlib>
#include <set>
#include <string>
Go to the source code of this file.
#define _POSIX_C_SOURCE 200112L |
Definition at line 57 of file plugin_search_path_t.cc.
62 if (default_libpath.empty()) {
77 ":" + libpath_before)};
79 CHECK(tp_sz == sp.size());
82 CHECK(tp_sz < path_entries(libpath));
86 SECTION(
"Standard Null")
91 CHECK(path_entries(libpath) == sp.size());
92 CHECK(remove_dups_from_path(libpath_before) == libpath);
96 SECTION(
"Standard Empty")
100 CHECK(1ull == sp.size());
107 setenv(
"SIMPLE_VAR", test_path.c_str(), 1);
110 CHECK(tp_sz == sp.size());
112 CHECK(remove_dups_from_path(
expected) == libpath);
113 CHECK(tp_sz < path_entries(libpath));
117 SECTION(
"Custom Null")
120 CHECK(1ull == sp.size());
125 SECTION(
"Custom Empty")
127 setenv(
"EMPTY_VAR",
"", 1);
129 CHECK(1ull == sp.size());
134 setenv(
os_libpath(), default_libpath.c_str(), 1);
constexpr char const * os_libpath()
constexpr char const * plugin_libpath()
std::string getenv(std::string const &name)
search_path plugin_search_path()