Changeset 93 for trunk/src/cutest_sh_utils.c
- Timestamp:
- Feb 26, 2007, 10:48:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cutest_sh_utils.c
r76 r93 143 143 char res3[] = "/"; 144 144 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 145 163 ret = sh_util_dirname(input0); 146 164 CuAssertPtrNotNull(tc, ret); … … 158 176 CuAssertPtrNotNull(tc, ret); 159 177 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); 160 202 return; 161 203 } … … 179 221 char res4[] = "bar"; 180 222 223 char input5[] = "/foo///bar///"; 224 char res5[] = "bar"; 225 226 char input6[] = "//foo"; 227 char res6[] = "foo"; 228 181 229 ret = sh_util_basename(input0); 182 230 CuAssertPtrNotNull(tc, ret); … … 198 246 CuAssertPtrNotNull(tc, ret); 199 247 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); 200 256 201 257 return;
Note:
See TracChangeset
for help on using the changeset viewer.