Euphoria
Ticket #633:
problem with dir()
-
Reported by
SDPringle
Mar 07, 2011
Now C:\Users\Shawn\Documents exists on my system. Now look at these tests:
test_not_equal( "dir() #1",
dir(lower(`C:\Users\Shawn\Documents*`)),
-1) --fails
test_not_equal( "dir() #2", dir(`C:\Users\Shawn\Documents*`), -1) --passes
test_not_equal("dir() #3",
dir(`c:\users\shawn\documents\development*`),
-1) --passes
test_equal("lower() #1",
lower(`C:\Users\Shawn\Documents*`),
lower(`C:\Users\Shawn\Documents`) & '*') -- passes
The first two tests differ only by the case of the string argument passed in.
Details
1. Comment by mattlewis
Mar 07, 2011
The problem is the way we treat wildcards in std/filesys.e:dir(). On windows, we can probably safely pass wildcards to the backend, which would avoid the case sensitivity issues faced by the use of wildcard_match().
I believe the *nix implementation does not allow wildcards passed to the backend, so that implementation would still need the special handling.
2. Comment by mattlewis
Mar 08, 2011
See: hg:euphoria/rev/75ea55ce51e3
changeset: 4711:75ea55ce51e3 branch: 4.0 parent: 4678:f66713a408d1 user: Matt Lewis date: Tue Mar 08 06:50:22 2011 -0500 files: docs/release/4.0.1.txt include/std/filesys.e description:
- dir() on windows is again case insensitive with wildcards
- fixes ticket 633
3. Comment by mattlewis
Mar 08, 2011
See: hg:euphoria/rev/a8c02d599466
changeset: 4713:a8c02d599466 tag: tip parent: 4709:b94e609a9f0c parent: 4712:3e68f49ecce1 user: Matt Lewis date: Tue Mar 08 06:56:27 2011 -0500 files: docs/release/4.0.1.txt include/std/filesys.e tests/t_c_slice_past_end_double.d/control.err description:
- merge unit test fix, fix for ticket 633 into trunk