. "$BST_LIB" require figlet figlet/present # figlet renders its argument as multi-line ASCII-art built from ordinary # characters, using a font from /usr/share/figlet. The default "standard" font # must ship for any render to work. check figlet/fontdir test -f /usr/share/figlet/standard.flf # Render a word from argv: the standard font turns "hi" into a banner whose # glyphs are drawn with underscores and pipes. Assert figlet exits 0 and the # banner carries a figlet glyph character. check_out figlet/render "_" figlet hi # The banner is several rows tall (standard font is 6 lines) — a single line of # output would mean the render collapsed. out=$(figlet hi 2>&1); rc=$? lines=$(printf '%s\n' "$out" | wc -l) if [ "$rc" -eq 0 ] && [ "$lines" -ge 4 ]; then bst_ok figlet/multiline else bst_notok figlet/multiline "rc=$rc lines=$lines $(_bst_1line "$out")"; fi # Text also arrives on stdin (the pipe form), the common banner usage. check_out figlet/stdin "_" sh -c 'echo brintOS | figlet'