]> granicus.if.org Git - imagemagick/blob - MagickWand/tests/script-token-test.sh
Test for the script-token module
[imagemagick] / MagickWand / tests / script-token-test.sh
1 #!/bin/sh
2 #
3 # Basic testing of ScriptToken parser.
4 #
5 #    script-token-test.sh | diff - script-token-test-results.txt
6 #
7 ./script-token-test script-token-test-data.txt
8 echo ""
9
10 echo -n "\"Next token bad quotes\" \"unfinished quotes ->" |\
11    ./script-token-test
12 echo ""
13
14 perl -e 'print "\"Binary input follows\"\n", "abc\006xyz\n"' |\
15    ./script-token-test
16 echo ""
17
18 ( echo '"Very BIG Token Tests"'
19   dd if=/dev/zero bs=80   count=1    2>/dev/null | tr '\0' 'a'; echo ""
20   dd if=/dev/zero bs=500  count=1    2>/dev/null | tr '\0' 'b'; echo ""
21   dd if=/dev/zero bs=4000 count=1    2>/dev/null | tr '\0' 'c'; echo ""
22   dd if=/dev/zero bs=5000 count=1    2>/dev/null | tr '\0' 'd'; echo ""
23   dd if=/dev/zero bs=10k  count=1    2>/dev/null | tr '\0' 'e'; echo ""
24   dd if=/dev/zero bs=13k  count=1    2>/dev/null | tr '\0' 'f'; echo ""
25   dd if=/dev/zero bs=8k   count=1024 2>/dev/null | tr '\0' 'e'; echo ""
26   echo '"and all is well!"'
27 ) | ./script-token-test
28 echo ""
29