X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/19210f529e50b1d1d66f7e3bdb31a76713b1a7c9..b797ae637bde7403d5b767bcca4b193cdc5afce2:/test/README diff --git a/test/README b/test/README index 7b1de5fd..e9dae928 100644 --- a/test/README +++ b/test/README @@ -71,6 +71,9 @@ in the test scripts. In particular: - Avoid depending on the exact format of output from system (non-nmh) programs. +- Use octal instead of hex (\x) bytes in printf(1) formats, because hex + is not supported by POSIX printf. + The Heirloom Bourne Shell, http://heirloom.sourceforge.net/sh.html, catches many non-portable shell constructs, such as $(), $(()), !, and assignment in export statements. @@ -78,3 +81,7 @@ assignment in export statements. checkbashisms, available at http://sourceforge.net/projects/checkbaskisms/, might help some catch problems. Though it misses all of the troublesome constructs, except for assignment in an export statement, listed above. + +The "Portable Shell" section of the Autoconf info manual has a wealth +of tips for avoiding portability problems in shell scripts. It might +be available by entering: info autoconf portable.