MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / get_temp_test_path

Function get_temp_test_path

tests/Profiles.cpp:23–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "Profiles.h"
22
23static std::string get_temp_test_path(const std::string& file_name) {
24#ifdef _WIN32
25 const char* base = std::getenv("TEMP");
26 if (!base || !*base) {
27 base = std::getenv("TMP");
28 }
29 if (!base || !*base) {
30 base = ".";
31 }
32 return std::string(base) + "\\" + file_name;
33#else
34 const char* base = std::getenv("TMPDIR");
35 if (!base || !*base) {
36 base = "/tmp";
37 }
38 return std::string(base) + "/" + file_name;
39#endif
40}
41
42static std::string test_output_profile_path(const std::string& base_name) {
43 std::stringstream file_name;

Callers 2

test_output_profile_pathFunction · 0.85
Profiles.cppFile · 0.85

Calls

no outgoing calls

Tested by 1

test_output_profile_pathFunction · 0.68