On 05/27/15 04:36, YongHao Hu wrote:
+static void test_tr2_sys__Equivalent(void) +{
- BOOL val;
- int i;
- FILE *file;
- struct {
char const *file_path1;
char const *file_path2;
BOOL equivalent;
It will make more sense to define it as int.
- } tests[] = {
{ "f1", "tr2_test_dir", -1 },
{ "tr2_test_dir", "tr2_test_dir", -1 },
{ "not_exists_file" , "not_exists_file", -1 },
{ "tr2_test_dir/./f1", "tr2_test_dir/f2", FALSE },
{ "tr2_test_dir/f1" , "tr2_test_dir/f1", TRUE },
{ "tr2_test_dir\\f1", "tr2_test_dir/././f1", TRUE },
{ "tr2_test_dir/../tr2_test_dir/f1", "tr2_test_dir/f1", TRUE },
Please add following test: { NULL, NULL, ... }, { "not_existing_file", "tr2_test_dir/f1", ... }
The tests are also failing when run from VirtualBox share. It's caused by the virtual machine bug (their probably generate a random FileIndexHigh/Low every time file is opened). Could you please create the test files inside temp directory to workaround this bug?
Cheers, Piotr