Eli Zaretskii <e...@gnu.org> skribis: >> From: l...@gnu.org (Ludovic Courtès) >> Cc: guile-devel@gnu.org >> Date: Wed, 02 Jul 2014 22:57:41 +0200 >> >> Eli Zaretskii <e...@gnu.org> skribis: >> >> >> From: l...@gnu.org (Ludovic Courtès) >> >> Cc: guile-devel@gnu.org >> >> Date: Tue, 01 Jul 2014 17:38:04 +0200 >> >> [...] >> >> >> You can look at load.c, and in particular scm_init_load_path. >> > >> > OK, thanks for the pointer. >> > >> > I've reviewed the related code, and below is what I suggest to push. >> > (This supersedes what I sent in >> > http://lists.gnu.org/archive/html/guile-devel/2014-06/msg00066.html.) >> >> Also, could you add tests for that? Namely, a ‘search-path’ use that >> currently returns a file name with backslashes, and will now return a >> file name with forward slashes. > > Is the below OK?
Looks good to me, OK to push. [...] > --- test-suite/tests/ports.test~2 2014-06-29 16:06:51 +0300 > +++ test-suite/tests/ports.test 2014-07-03 10:55:30 +0300 > @@ -1866,6 +1865,17 @@ > (with-fluids ((%file-port-name-canonicalization 'absolute)) > (port-filename (open-input-file (%search-load-path "ice-9/q.scm")))))) > > +(with-test-prefix "file name separators" > + > + (pass-if "no backslash separators in Windows file names" > + ;; In Guile 2.0.11 and earlier, %load-path on Windows could > + ;; include file names with backslashes, and `getcwd' on Windows > + ;; would always return a directory name with backslashes. > + (or (not (file-name-separator? #\\)) > + (with-load-path (cons (getcwd) %load-path) > + (not (string-index (%search-load-path (basename (test-file))) > + #\\)))))) No tabs in Scheme files please (if you use Emacs, there’s a .dir-locals.el that should set it up correctly.) Thanks! Ludo’.