Goals:
To verify that Balkón produces the same output in the testing environment as it did in development.
To verify that ignored files for Git are set correctly.
To verify that the files containing expected or "golden" output of tests are up to date.
To verify that tests are not being skipped.
Prerequisites:
Steps:
Clean the Git working tree so that git status
reports no differences.
Run automated Balkón tests using cabal run
.
Verify that all tests passed.
Verify that git status
reports no differences.
Verify that a file named spannedLoremIpsum20em.actual
was generated by
automated tests in the directory .golden/shapedRuns/
.
ls -l .golden/shapedRuns/spannedLoremIpsum20em.actual
and checking the file's modification time.Goals:
Prerequisites:
Access to files from the Git repository of Balkón.
Successfully built Typograffiti.
This script was successfully used with Typograffiti commit 1c30cf54 built from source.
However, the draw-shaped
executable is currently known to suffer from a
heavy memory leak. It may crash in as little as half a minute, depending
on your system resources.
To avoid overloading your machine, consider limiting the executable's
data segment size to 1 GiB (ulimit -Sd 1048576
), then run draw-shaped
,
and either stop the process before inspecting the window's contents, or
screenshot the window for later inspection and terminate the process.
Steps:
Run Typograffiti with the font path, face index, pixel size,
and scale set according to the contents of the file
.golden/shapedRuns/spannedLoremIpsum20em.fontInfo
from Balkón,
and with input set to be read from the file
.golden/shapedRuns/spannedLoremIpsum20em.golden
from Balkón.
Verify that text is displayed in the output window.
If necessary, resize the window so that the whole paragraph can be seen.
Verify all of the following:
a. The displayed text is legible.
b. The displayed glyphs appear at correct sizes. There should be a small amount of blank space around each visible glyph so that it does not overlap with its neighbours, but not so much that the text feels disconnected.
c. The displayed text matches loremIpsumParagraph
from the file
test/Data/Text/ParagraphLayout/ParagraphData.hs
from Balkón,
character for character, except where a space was replaced
by a line break.
d. All displayed lines are aligned to the left edge of the output, without any indentation.
e. All displayed lines are broken before words, not in the middle of words and not before punctuation marks.
f. Lines do not appear to be broken too early.
g. The horizontal space between each pair of adjacent words appears equal.
h. The vertical space between the baselines of two adjacent lines appears equal.
i. The text begins at the top of the window, with only a small amount of blank space below the top of the window that is not large enough to insert another line of text.
Goals:
Prerequisites:
Access to files from the Git repository of Balkón.
Successfully built Typograffiti. See previous script.
Successfully verified visual output for a whole paragraph. See previous script.
Steps:
Run Typograffiti with the font path, face index, pixel size,
and scale set according to the contents of the file
.golden/shapedRuns/spannedLoremIpsum20emPage3.fontInfo
from Balkón,
and with input set to be read from the file
.golden/shapedRuns/spannedLoremIpsum20emPage3.golden
from Balkón.
Verify that text is displayed in the output window.
If necessary, resize the window so that the whole paragraph can be seen.
Verify all of the following:
a. There are three lines of text displayed.
b. These three lines look exactly the same as lines 7 through 9 of the paragraph from the previous script.
c. All displayed lines are aligned to the left edge of the output, without any indentation.
d. The text begins at the top of the window, with only a small amount of blank space below the top of the window that is not large enough to insert another line of text.