> From: Bruno Haible <[email protected]> > Cc: [email protected] > Date: Fri, 11 May 2012 01:42:20 +0200 > > expected: ??? > received: sys > expected: ???? > received: sys > expected: ????? > received: sys > for input = |???|: CreateProcess() command failed with status 1: > .\test-system-quote-child.exe ??? > for input = |????|: CreateProcess() command failed with status 1: > .\test-system-quote-child.exe ???? > for input = |?????|: CreateProcess() command failed with status 1: > .\test-system-quote-child.exe ????? > for input = |??????|: CreateProcess() command failed with status 3: > .\test-system-quote-child.exe ?????? > for input = |???????|: CreateProcess() command failed with status 3: > .\test-system-quote-child.exe ??????? > for input = |????????|: CreateProcess() command failed with status 3: > .\test-system-quote-child.exe ???????? > for input = |?????????|: CreateProcess() command failed with status 3: > .\test-system-quote-child.exe ????????? > FAIL: test-system-quote.sh > > Don't ask me why "????" and "?????" match "sys"...
Evidently, because on Windows "????" matches file names that have 4 characters _or_less_. You can see this with "dir ???" etc. Btw, there's another subtlety in Windows globbing of wildcards: it matches both the "normal" file names and their 8+3 aliases. Therefore, "????????" (8 ? characters) will match every file without an extension, and "????????.???" will match _all_ the files. But perhaps the most surprising consequence of this is something this guy bumped into: http://answers.microsoft.com/en-us/windows/forum/windows_7-files/is-this-a-known-problem-with-windows-wildcard/fbd381a5-bb80-e011-9b4b-68b599b31bf5
