[oprof-cvs] CVS: oprofile/libutil++/tests file_manip_tests.cpp,1.3,1.4 path_filter_tests.cpp,1.1,1.2
From: Philippe E. <ph...@us...> - 2003-11-04 20:02:13
|
Update of /cvsroot/oprofile/oprofile/libutil++/tests In directory sc8-pr-cvs1:/tmp/cvs-serv7518/libutil++/tests Modified Files: file_manip_tests.cpp path_filter_tests.cpp Log Message: remove FIXME in path_filter::match() Index: file_manip_tests.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libutil++/tests/file_manip_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- file_manip_tests.cpp 1 Nov 2003 02:07:41 -0000 1.3 +++ file_manip_tests.cpp 4 Nov 2003 20:02:09 -0000 1.4 @@ -69,6 +69,8 @@ static input_output<char const *, char c { "/../..", "/.." }, { "./..", "." }, { "./.", "." }, + { "..", "." }, + { ".", "." }, { 0, 0 } }; @@ -96,6 +98,7 @@ static input_output<char const *, char c { "/../..", ".." }, { "./..", ".." }, { "./.", "." }, + { ".", "." }, { 0, 0 } }; Index: path_filter_tests.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libutil++/tests/path_filter_tests.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- path_filter_tests.cpp 2 Nov 2003 01:17:37 -0000 1.1 +++ path_filter_tests.cpp 4 Nov 2003 20:02:09 -0000 1.2 @@ -66,5 +66,13 @@ int main() check(f6, "foo ", false); check(f6, "foo/ bar", false); + path_filter f7(".", ""); + check(f7, ".", true); + // a bit surprising but right IMHO, our implementation use successive + // dirname(input) to check vs the included path and + // dirname("foo") == "." so all relative path input match a "." + // included filter + check(f7, "foo", true); + return EXIT_SUCCESS; } |