Some of the tests listed in TESTCMDS may fail in your environment.
This is usually not an error of lesspipe.sh but
- due to software that is not installed at all or
- required programs are available in an to old version only or
- the file command has not an up to date magic file.
- the files were created on Linux, some file formats are architecture dependent
One example is the bz2 test which fails for bzip2 versions prior to version
1.0. Another example is the dvi test if dvi2tty is not installed. 
And cabextract prior to version 1.0 will pollute your working directory
with unpacked files. Both the old bzip2 and cabextract versions are detected
by configure and are not accepted.

If the test for the file testok/test.utf16 fails although iconv is available,
then the magic file needs to be modified (suppress the recognition of MPEG ADTS
formats).

The test.pl script sets internally the variables LESSOPEN and
LESS_ADVANCED_PREPROCESSOR, therefore executing the commands outside of the
script may produce different results.
