flbng

flash bang - show full screen centered text in terminal
git clone git://git.konyahin.xyz/flbng
Log | Files | Refs | README | LICENSE

test.sh (751B)


      1 #!/usr/bin/env sh
      2 
      3 # no new line at the end of text
      4 printf "first normal line\nno new line at the end" | ./flbng
      5 
      6 # ascii art
      7 figlet flash bang test | ./flbng
      8 
      9 # random fortune text
     10 /usr/games/fortune | ./flbng
     11 
     12 # as much lines as terminal height
     13 lines() {
     14     for i in $(seq $(tput lines))
     15         do echo "$i"
     16     done
     17 }
     18 lines | ./flbng
     19 
     20 # as much chars as terinal widht
     21 chars () {
     22     for i in $(seq $(tput cols))
     23         do printf "*"
     24     done
     25 }
     26 chars | ./flbng
     27 
     28 ./flbng <<EOF
     29 Some errors check. Should be:
     30     flbng: too much lines for this terminal, should be less than X
     31     flbng: too long line for this terminal, should be shorter than X
     32     flbng: empty input
     33 EOF
     34 
     35 echo "0\n$(lines)" | ./flbng
     36 echo "*$(chars)" | ./flbng
     37 printf "" | ./flbng