Replaced mktemp which can be different/absent in some systems with
static filenames which should be good enough for our tests.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Hex sequence is not POSIX compliant, causing run-tests.sh to fail on
systems with Debian Almquist shell as the default shell.
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Use printf instead of echo -n in order to have a Single Unix Specification
compliant script and work in MacOS X 10.5.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Test banner was being print before setting the fonts directory, which
make it fail if FIGlet is not already installed on the system.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Environment variable FIGLET_FONTDIR can be used to set the path to search
for font files. This variable is used in the test script when FIGlet is
installed on a staging directory.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Make sure the binary built from the distribution package uses a local
font directory to run tests.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Linefeed characters are printed differently depending of the shell
used as /bin/sh. Use an extra echo to prevent output problems.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
The following tests have been added:
test 017: tlf2 kerning flush-right mode
test 018: tlf2 overlap centered mode
test 019: tlf2 full-width flush-left right-to-left mode
test 020: specify font directory
test 021: paragraph mode long line output
test 022: short line output
test 023: kerning paragraph centered mode (small)
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Add test target to the Makefile, and also automatically run tests
in the dist target. Current test results:
Run tests in /home/claudio/figlet/figlet
_____ _ _ _
|_ _|__ __| |_ _ _ ___ ____ _| | |_ ___
| |/ -_|_-< _| | '_/ -_|_-< || | | _(_-<
|_|\___/__/\__| |_| \___/__/\_,_|_|\__/__/
Run test 001: showfigfonts output... pass
Run test 002: text rendering in all fonts... pass
Run test 003: long text rendering... pass
Run test 004: left-to-right text... pass
Run test 005: right-to-left text... pass
Run test 006: flush-left justification... pass
Run test 007: flush-right justification... pass
Run test 008: center justification... pass
Run test 009: kerning mode... pass
Run test 010: full width mode... pass
Run test 011: overlap mode... pass
Run test 012: TLF font rendering... pass
Run test 013: kerning flush-left right-to-left mode... pass
Run test 014: kerning centered right-to-left mode (slant)... pass
Run test 015: full-width flush-right right-to-left mode... pass
Run test 016: overlap flush-right mode (big)... pass
All tests passed.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>