Sha256: 18c9f746fcb2b6aa5db19ad1dad69937f0ee35219a6292835c7058bfa955eb36

Contents?: true

Size: 735 Bytes

Versions: 25

Compression:

Stored size: 735 Bytes

Contents

static const char *
fixture_path(const char *base, const char *fixture_name)
{
	static char _path[4096];
	size_t root_len;

	root_len = strlen(base);
	strncpy(_path, base, sizeof(_path));

	if (_path[root_len - 1] != '/')
		_path[root_len++] = '/';

	if (fixture_name[0] == '/')
		fixture_name++;

	strncpy(_path + root_len,
		fixture_name,
		sizeof(_path) - root_len);

	return _path;
}

#ifdef CLAR_FIXTURE_PATH
const char *cl_fixture(const char *fixture_name)
{
	return fixture_path(CLAR_FIXTURE_PATH, fixture_name);
}

void cl_fixture_sandbox(const char *fixture_name)
{
	fs_copy(cl_fixture(fixture_name), _clar_path);
}

void cl_fixture_cleanup(const char *fixture_name)
{
	fs_rm(fixture_path(_clar_path, fixture_name));
}
#endif

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mathematical-1.6.20 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.18 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.14 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.13 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.12 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.11 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.10 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.9 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.8 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.7 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.6 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.5 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.4 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.3 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.2 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.1 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.6.0 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.5.12 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.5.0 ext/mathematical/mtex2MML/tests/clar/fixtures.h
mathematical-1.4.2 ext/mathematical/mtex2MML/tests/clar/fixtures.h