[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Windows file name separators
From: |
Ludovic Courtès |
Subject: |
Re: Windows file name separators |
Date: |
Thu, 03 Jul 2014 19:11:41 +0200 |
User-agent: |
Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) |
Eli Zaretskii <address@hidden> skribis:
>> From: address@hidden (Ludovic Courtès)
>> Cc: address@hidden
>> Date: Wed, 02 Jul 2014 22:57:41 +0200
>>
>> Eli Zaretskii <address@hidden> skribis:
>>
>> >> From: address@hidden (Ludovic Courtès)
>> >> Cc: address@hidden
>> >> 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’.
- Re: Windows file name separators, Ludovic Courtès, 2014/07/01
- Re: Windows file name separators, Eli Zaretskii, 2014/07/01
- Re: Windows file name separators, Ludovic Courtès, 2014/07/01
- Re: Windows file name separators, Eli Zaretskii, 2014/07/02
- Re: Windows file name separators, Ludovic Courtès, 2014/07/02
- Re: Windows file name separators, Ludovic Courtès, 2014/07/02
- Re: Windows file name separators, Eli Zaretskii, 2014/07/03
- Re: Windows file name separators,
Ludovic Courtès <=
- Re: Windows file name separators, Eli Zaretskii, 2014/07/03
- Re: Windows file name separators, Mark H Weaver, 2014/07/07
- Re: Windows file name separators, Eli Zaretskii, 2014/07/07
- Fix 'dirname' and 'basename' on MS-Windows, Eli Zaretskii, 2014/07/02
- Re: Fix 'dirname' and 'basename' on MS-Windows, Ludovic Courtès, 2014/07/09
- Re: Fix 'dirname' and 'basename' on MS-Windows, Eli Zaretskii, 2014/07/09
- Provide reasonable stack limit on MS-Windows, Eli Zaretskii, 2014/07/02
- Re: Provide reasonable stack limit on MS-Windows, Ludovic Courtès, 2014/07/02
- Re: Provide reasonable stack limit on MS-Windows, Eli Zaretskii, 2014/07/03
- Bug in scm_getaffinity, Eli Zaretskii, 2014/07/02