Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dir_tests.cpp « tests « base « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: baf3ce33776edd3ad785a0d495e8d504a12d42bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * \file   dir_tests.cpp
 * \brief  Directory handling automated tests.
 * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
 */

#include "premake.h"
#include "testing/testing.h"
extern "C" {
#include "base/dir.h"
#include "base/cstr.h"
}

SUITE(base)
{
	TEST(DirExists_ReturnsOkay_OnEmptyPath)
	{
		int result = dir_exists("");
		CHECK(result);
	}

	TEST(DirGetCurrent_ReturnsCurrent_WithSlashes)
	{
		const char* result = dir_get_current();
		CHECK(cstr_ends_with(result, "/src"));
	}
}