fd9099727e
In the filename expansion test, don't insist on testing cases of [^a] anything not an a) (etc) - while almost all shells allow ^ there (as in regular expressions) this is not standard sh/glob syntax (! is used for that, not ^). Use of ^ as first char after '[' in a [] match has unspecified behaviour. So, check if the shell being tested supports ^ used this way before running the tests of ^ in []. This makes no difference at all when testing the NetBSD sh which does allow ^ for that use case. Fix an obvious (in hindsight) stupidity in the case pattern tests (a cut/paste/forget-to-fix type error). Many cleanups, including some additional sub-tests, for the var substring matching (just a couple of actual fixes to the tests). (This was the last added, and least polished part - still is.) This makes no difference to the filename expansion tests (11 of 167 still fail), the fix reduces the failing case match tests from 14 of 261 to 13 of 261. For var substring tests, the failure has changed from 6 of 87 to 8 of 99. (Some) Fixes to sh will appear soon. For comparison, using this version of the test, dash passes all case and var substring tests, and (aside from the [^...] tests which it does not implement) fails 4 of the filename tests. bash fails one case test (a bash oddity in interpretation of the spec, which is unique to bash amongst shells I have tested) and one filename expansion (all var substring tests pass). Other shells are much worse (though the freebsd shell results were coloured by the version of their shell I tested still having the [[:xxx:]] always matches '[' bug, which is fixed in later versions of their shell) |
||
---|---|---|
.. | ||
cat | ||
cp | ||
dd | ||
df | ||
expr | ||
pax | ||
ps | ||
sh | ||
sleep | ||
tar | ||
Makefile |