QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
test-qfs.c File Reference

Macros

#define num_ext_tests   (sizeof (ext_tests) / sizeof (ext_tests[0]))
 
#define num_path_tests   (sizeof (path_tests) / sizeof (path_tests[0]))
 
#define num_strip_tests   (sizeof (strip_tests) / sizeof (strip_tests[0]))
 

Functions

int main (int argc, const char **argv)
 

Variables

struct {
   int   expect_offset
 
   const char *   path
 
ext_tests []
 
struct {
   const char *   expect
 
   const char *   path
 
path_tests []
 
struct {
   const char *   expect
 
   const char *   path
 
strip_tests []
 

Macro Definition Documentation

#define num_ext_tests   (sizeof (ext_tests) / sizeof (ext_tests[0]))
#define num_path_tests   (sizeof (path_tests) / sizeof (path_tests[0]))
#define num_strip_tests   (sizeof (strip_tests) / sizeof (strip_tests[0]))

Function Documentation

int main ( int  argc,
const char **  argv 
)

Variable Documentation

const char* expect
int expect_offset
struct { ... } ext_tests[]
Initial value:
= {
{"foo", 3},
{"foo.a", 3},
{"foo.a.b", 5},
{".foo", 4},
{"bar/foo", 7},
{"bar/foo.a", 7},
{"bar/foo.a.b", 9},
{"bar/.foo", 8},
{"bar.a/foo", 9},
}
const char* path
struct { ... } path_tests[]
Initial value:
= {
{"", ""},
{"/x", "/x"},
{"x/", "x"},
{"/", "/"},
{"\\", "/"},
{".", ""},
{"./", ""},
{"/.", "/"},
{"..", ".."},
{"/..", "/"},
{"foo/..", ""},
{"foo/bar/..", "foo"},
{"foo/bar/.", "foo/bar"},
{"foo//bar", "foo/bar"},
{"foo/./bar", "foo/bar"},
{"../foo/..", ".."},
{"\\blah\\../foo/..\\baz/.\\x", "/baz/x"},
}
struct { ... } strip_tests[]
Initial value:
= {
{"foo", "foo"},
{"foo.a", "foo"},
{"foo.a.b", "foo.a"},
{".foo", ".foo"},
{"bar/foo", "bar/foo"},
{"bar/foo.a", "bar/foo"},
{"bar/foo.a.b", "bar/foo.a"},
{"bar/.foo", "bar/.foo"},
{"bar.a/foo", "bar.a/foo"},
}