diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-06-30 20:05:55 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-06-30 20:05:55 +0000 |
commit | 81ba0303f29b08507cccad29eecf2b30b012df63 (patch) | |
tree | 981bdae8afd0d4fac5e4834ae2c0b3b9a0462d5a /test/pbmtext-iso88591.test | |
parent | d9c9d6a198247612248ad094ed7d40dcd4fa9031 (diff) | |
download | netpbm-mirror-81ba0303f29b08507cccad29eecf2b30b012df63.tar.gz netpbm-mirror-81ba0303f29b08507cccad29eecf2b30b012df63.tar.xz netpbm-mirror-81ba0303f29b08507cccad29eecf2b30b012df63.zip |
Promote current Development release as Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3289 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pbmtext-iso88591.test')
-rwxr-xr-x | test/pbmtext-iso88591.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/pbmtext-iso88591.test b/test/pbmtext-iso88591.test new file mode 100755 index 00000000..34346f5c --- /dev/null +++ b/test/pbmtext-iso88591.test @@ -0,0 +1,46 @@ +#! /bin/bash +# This script tests: pbmtext +# Also requires: + +# This test requires the following locale: +# LC_ALL en_US.iso88591 +# Skip this test if it is not available + +iconv /dev/null +if [ $? -ne 0 ] + then echo "iconv command not available." 1>&2 + echo "Skipping." 1>&2 + exit 80; +fi + +echo "A" | LC_ALL=en_US.iso88591 pbmtext -wchar > /dev/null +if [ $? -ne 0 ] + then echo "LC_ALL could not be set to en_US.iso88591" 1>&2 + echo "Skipping." 1>&2 + exit 80; +fi + +# Two rows +# Should print 3491766365 5110 twice +LC_ALL=C \ +awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i); print ""; \ + for (i=160;i<=255;++i) printf("%c",i); }' | \ + pbmtext -builtin bdf | cksum + + +LC_ALL=C \ +awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i); print ""; \ + for (i=160;i<=255;++i) printf("%c",i); }' | \ + LC_ALL=en_US.iso88591 pbmtext -builtin bdf -wchar | cksum + + +# Two rows +# Should print 259944121 191 twice +LC_ALL=C \ +awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i); print ""; \ + for (i=161;i<=255;++i) printf("%c",i); print "" }' | cksum + +LC_ALL=C \ +awk 'BEGIN { for (i=32; i<=125;++i) printf("%c",i); print ""; \ + for (i=161;i<=255;++i) printf("%c",i); print ""}' | \ + LC_ALL=en_US.iso88591 pbmtext -builtin bdf -wchar -text-dump | cksum \ No newline at end of file |