This commit is contained in:
Thomas Levine 2016-03-31 20:42:22 +00:00
parent 3122b2cc63
commit a957ca9065

View File

@ -114,15 +114,30 @@ urchin looks for files within a directory in the following manner,
do_something_with_test_file $file do_something_with_test_file $file
done done
so files are run in whatever order `*` produces. On GNU systems the so files are run in whatever order `*` produces. The order is
order is configured in your configured in your environment, at least in
[environment](https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021). [GNU systems](https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021).
Other systems may ignore the locales configured in the environment and Other systems may ignore the locales configured in the environment and
always produce ASCIIbetical order. always produce ASCIIbetical order.
Results are always printed in ASCIIbetical order, regardless of what Results are always printed in ASCIIbetical order, regardless of what
order the tests ran in. order the tests ran in.
Below you can see how the locale can affect the order.
$ printf '!c\n@a\n~b\n' | LC_COLLATE=C sort
!c
@a
~b
$ printf '!c\n@a\n~b\n' | LC_COLLATE=en_US.UTF-8 sort
@a
~b
!c
$ printf '!c\n@a\n~b\n' | sort -d
@a
~b
!c
### Writing cross-shell compatibility tests for testing shell code ### Writing cross-shell compatibility tests for testing shell code
While you could write your test scripts to explicitly invoke the functionality While you could write your test scripts to explicitly invoke the functionality