diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/pamtosvg.test | 2 | ||||
-rwxr-xr-x | test/pbmtext-iso88591.test | 11 | ||||
-rwxr-xr-x | test/pbmtext-utf8.test | 10 | ||||
-rwxr-xr-x | test/pgmnoise.test | 2 | ||||
-rwxr-xr-x | test/ppmforge.test | 2 | ||||
-rwxr-xr-x | test/ppmpat-random.test | 6 | ||||
-rwxr-xr-x | test/random-generator.test | 3 |
7 files changed, 12 insertions, 24 deletions
diff --git a/test/pamtosvg.test b/test/pamtosvg.test index 332040ea..4acf1fd9 100755 --- a/test/pamtosvg.test +++ b/test/pamtosvg.test @@ -40,6 +40,6 @@ EOF echo "Test 2. Should print match" -pamtosvg testgrid.pbm | tee /tmp/a2 |\ +pamtosvg testgrid.pbm |\ cmp -s ${testgrid_svg} - && echo "match" || echo "no match" rm ${testgrid_svg} diff --git a/test/pbmtext-iso88591.test b/test/pbmtext-iso88591.test index e8dec8d2..1472b89e 100755 --- a/test/pbmtext-iso88591.test +++ b/test/pbmtext-iso88591.test @@ -13,14 +13,15 @@ tmpdir=${tmpdir:-/tmp} iso88591_locale_list=${tmpdir}/iso88591_locale_list locale_to_test="en_US.iso88591" # Initial value; this -# does not have to be present in -# Edit the above value if necessary +# does not have to be actually available. +# Edit the above value if you have a preferred locale. -# Make a list of available locales which end in "iso88591" +# Make a list of available locales which end in "iso88591" etc. # If none are found, abort test -locale -a | grep "\.iso88591$" > ${iso88591_locale_list} ||\ - locale_to_test="" +locale -a |\ + grep -e "\.iso88591$" -e "\.iso-8859-1$" -e "\.ISO-8859-1$" \ + > ${iso88591_locale_list} || locale_to_test="" # Hunt for a valid iso-8859-1 locale # Submit each candidate to a trial pbmtext run until one that works is diff --git a/test/pbmtext-utf8.test b/test/pbmtext-utf8.test index a10b3d33..551cfe29 100755 --- a/test/pbmtext-utf8.test +++ b/test/pbmtext-utf8.test @@ -20,14 +20,14 @@ tmpdir=${tmpdir:-/tmp} utf_locale_list=${tmpdir}/utf_locale_list locale_to_test="en_US.utf8" # Initial value; this -# does not have to be present in following list -# Edit the above value if necessary +# does not have to be actually available. +# Edit the above value if you have a preferred locale. -# Make a list of available locales which end in "utf8" +# Make a list of available locales which end in "utf8" etc. # If none are found, abort test -locale -a | grep "\.utf8$" > ${utf_locale_list} ||\ - locale_to_test="" +locale -a | grep -e "\.utf8$" -e "\.utf-8$" -e "\.UTF-8$" \ + > ${utf_locale_list} || locale_to_test="" # Hunt for a valid utf8 locale # Submit each candidate to a trial pbmtext run until one that works is diff --git a/test/pgmnoise.test b/test/pgmnoise.test index ed41622f..36f16ab0 100755 --- a/test/pgmnoise.test +++ b/test/pgmnoise.test @@ -4,8 +4,6 @@ echo "Test 1." echo "Should print: 2132901423 10015" # (Mersenne Twister) -# 1663614689 10015 (Glibc rand()) -# 3516404574 10015 (MAC OS rand()) pgmnoise --randomseed=0 100 100 | cksum diff --git a/test/ppmforge.test b/test/ppmforge.test index 75de7cf7..a4dedf68 100755 --- a/test/ppmforge.test +++ b/test/ppmforge.test @@ -3,8 +3,6 @@ # Also requires: pnmpsnr echo "Test 1. Should print: 547829788 196623 (Mersenne Twister)" -# 3634219838 196623 (Glibc rand() ) -# 3262664440 196623 (MAC OS rand() ) ppmforge -night -seed 1 | cksum tmpdir=${tmpdir:-/tmp} diff --git a/test/ppmpat-random.test b/test/ppmpat-random.test index b1b78d94..4da0d77c 100755 --- a/test/ppmpat-random.test +++ b/test/ppmpat-random.test @@ -8,20 +8,14 @@ # These tests require random numbers. echo "Test 1. Should print: 1366170000 36015" # Mersenne Twister -# 2219119109 36015 (glibc rand()) -# 3606254242 36015 (MAC OS rand()) ppmpat --randomseed=0 -camo 100 120 | cksum echo "Test 2. Should print: 4073196212 16813" # Mersenne Twister -# 3436846137 16813 (glibc) -# 3615722579 16813 (MAC OS rand()) ppmpat --randomseed=0 -anticamo 80 70 | cksum echo "Test 3. Should print: 2292015301 16813" # Mersenne Twister -# 908097729 16813 (glibc rand()) -# 1756684515 16813 (MAC OS rand()) ppmpat --randomseed=0 --color \ rgb:55/c0/34,rgb:0/ff/0,rgb:0/ee/0,rgb:0/cd/0,rgb:0/8b/0,rgb:4f/4f/2f \ diff --git a/test/random-generator.test b/test/random-generator.test index 14b6f11a..351b982e 100755 --- a/test/random-generator.test +++ b/test/random-generator.test @@ -26,9 +26,6 @@ echo "1023" echo "720 296 192 858 101 57 298 629 804 1019 64 617" echo "Above output is for Mersenne Twister" -# GNU libc rand(): 593 252 207 990 507 824 961 805 559 110 167 172 -# MAC OS rand(): 9 782 60 418 364 654 670 172 1022 515 593 903 - pgmnoise -maxval=1023 -randomseed=3791 -plain 12 1 echo |