Ignore:
Timestamp:
Feb 26, 2007, 10:48:51 PM (18 years ago)
Author:
rainer
Message:

Add check for PCI ROMs; fix ticket #51 (symlinks in root directory reported with leading double slash).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cutest_sh_utils.c

    r76 r93  
    143143  char res3[] = "/";
    144144
     145  char input4[] = "///foo//bar";
     146  char res4[] = "///foo";
     147
     148  char input5[] = "//foo///bar///";
     149  char res5[] = "//foo";
     150
     151  char input6[] = "///";
     152  char res6[] = "///";
     153
     154  char input7[] = "//f///b///";
     155  char res7[] = "//f";
     156
     157  char input8[] = "/f/b/";
     158  char res8[] = "/f";
     159
     160  char input9[] = "/f/b";
     161  char res9[] = "/f";
     162
    145163  ret = sh_util_dirname(input0);
    146164  CuAssertPtrNotNull(tc, ret);
     
    158176  CuAssertPtrNotNull(tc, ret);
    159177  CuAssertStrEquals(tc, res3, ret);
     178
     179  ret = sh_util_dirname(input4);
     180  CuAssertPtrNotNull(tc, ret);
     181  CuAssertStrEquals(tc, res4, ret);
     182
     183  ret = sh_util_dirname(input5);
     184  CuAssertPtrNotNull(tc, ret);
     185  CuAssertStrEquals(tc, res5, ret);
     186
     187  ret = sh_util_dirname(input6);
     188  CuAssertPtrNotNull(tc, ret);
     189  CuAssertStrEquals(tc, res6, ret);
     190
     191  ret = sh_util_dirname(input7);
     192  CuAssertPtrNotNull(tc, ret);
     193  CuAssertStrEquals(tc, res7, ret);
     194
     195  ret = sh_util_dirname(input8);
     196  CuAssertPtrNotNull(tc, ret);
     197  CuAssertStrEquals(tc, res8, ret);
     198
     199  ret = sh_util_dirname(input9);
     200  CuAssertPtrNotNull(tc, ret);
     201  CuAssertStrEquals(tc, res9, ret);
    160202  return;
    161203}
     
    179221  char res4[] = "bar";
    180222
     223  char input5[] = "/foo///bar///";
     224  char res5[] = "bar";
     225
     226  char input6[] = "//foo";
     227  char res6[] = "foo";
     228
    181229  ret = sh_util_basename(input0);
    182230  CuAssertPtrNotNull(tc, ret);
     
    198246  CuAssertPtrNotNull(tc, ret);
    199247  CuAssertStrEquals(tc, res4, ret);
     248
     249  ret = sh_util_basename(input5);
     250  CuAssertPtrNotNull(tc, ret);
     251  CuAssertStrEquals(tc, res5, ret);
     252
     253  ret = sh_util_basename(input6);
     254  CuAssertPtrNotNull(tc, ret);
     255  CuAssertStrEquals(tc, res6, ret);
    200256
    201257  return;
Note: See TracChangeset for help on using the changeset viewer.