Mercurial > octave-nkf
comparison test/fntests.m @ 13833:0a28c49cb477
Format test suite output correctly on Win32.
* fntestsm (run_test_dir, run_test_script): Use filesep instead of hardcoded
forward slash.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sun, 06 Nov 2011 20:08:17 +0000 |
parents | 968e89b45bbf |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
13832:2e4252228f73 | 13833:0a28c49cb477 |
---|---|
117 nm = lst(i).name; | 117 nm = lst(i).name; |
118 if (lst(i).isdir | 118 if (lst(i).isdir |
119 && ! strcmp (nm, ".") && ! strcmp (nm, "..") | 119 && ! strcmp (nm, ".") && ! strcmp (nm, "..") |
120 && ! strcmp (nm, "private") && nm(1) != "@" | 120 && ! strcmp (nm, "private") && nm(1) != "@" |
121 && ! strcmp (nm, "CVS")) | 121 && ! strcmp (nm, "CVS")) |
122 [p, n, xf, sk] = run_test_dir (fid, [d, "/", nm]); | 122 [p, n, xf, sk] = run_test_dir (fid, [d, filesep, nm]); |
123 dp += p; | 123 dp += p; |
124 dn += n; | 124 dn += n; |
125 dxf += xf; | 125 dxf += xf; |
126 dsk += sk; | 126 dsk += sk; |
127 endif | 127 endif |
165 dp = dn = dxf = dsk = 0; | 165 dp = dn = dxf = dsk = 0; |
166 for i = 1:length (lst) | 166 for i = 1:length (lst) |
167 nm = lst(i).name; | 167 nm = lst(i).name; |
168 if (lst(i).isdir && ! strcmp (nm, ".") && ! strcmp (nm, "..") | 168 if (lst(i).isdir && ! strcmp (nm, ".") && ! strcmp (nm, "..") |
169 && ! strcmp (nm, "CVS")) | 169 && ! strcmp (nm, "CVS")) |
170 [p, n, xf, sk] = run_test_script (fid, [d, "/", nm]); | 170 [p, n, xf, sk] = run_test_script (fid, [d, filesep, nm]); |
171 dp += p; | 171 dp += p; |
172 dn += n; | 172 dn += n; |
173 dxf += xf; | 173 dxf += xf; |
174 dsk += sk; | 174 dsk += sk; |
175 endif | 175 endif |
184 if ((length (nm) > 2 && strcmp (nm((end-1):end), ".m")) || | 184 if ((length (nm) > 2 && strcmp (nm((end-1):end), ".m")) || |
185 (length (nm) > 3 && strcmp (nm((end-2):end), ".cc"))) | 185 (length (nm) > 3 && strcmp (nm((end-2):end), ".cc"))) |
186 p = n = xf = 0; | 186 p = n = xf = 0; |
187 ## Only run if it contains %!test, %!assert %!error or %!warning | 187 ## Only run if it contains %!test, %!assert %!error or %!warning |
188 if (has_tests (f)) | 188 if (has_tests (f)) |
189 tmp = strrep (f, [topsrcdir, "/"], ""); | 189 tmp = strrep (f, [topsrcdir, filesep], ""); |
190 tmp = strrep (tmp, [topbuilddir, "/"], "../"); | 190 tmp = strrep (tmp, [topbuilddir, filesep], ["..", filesep]); |
191 print_test_file_name (tmp); | 191 print_test_file_name (tmp); |
192 [p, n, xf, sk] = test (f, "quiet", fid); | 192 [p, n, xf, sk] = test (f, "quiet", fid); |
193 print_pass_fail (n, p); | 193 print_pass_fail (n, p); |
194 dp += p; | 194 dp += p; |
195 dn += n; | 195 dn += n; |