"Fossies" - the Fresh Open Source Software Archive

Member "lzip-1.22/testsuite/check.sh" (2 Jan 2021, 16302 Bytes) of package /linux/misc/lzip-1.22.tar.lz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes reports for "check.sh": 1.22-rc3_vs_1.22 or 1.21_vs_1.22.

    1 #! /bin/sh
    2 # check script for Lzip - LZMA lossless data compressor
    3 # Copyright (C) 2008-2021 Antonio Diaz Diaz.
    4 #
    5 # This script is free software: you have unlimited permission
    6 # to copy, distribute, and modify it.
    7 
    8 LC_ALL=C
    9 export LC_ALL
   10 objdir=`pwd`
   11 testdir=`cd "$1" ; pwd`
   12 LZIP="${objdir}"/lzip
   13 framework_failure() { echo "failure in testing framework" ; exit 1 ; }
   14 
   15 if [ ! -f "${LZIP}" ] || [ ! -x "${LZIP}" ] ; then
   16     echo "${LZIP}: cannot execute"
   17     exit 1
   18 fi
   19 
   20 [ -e "${LZIP}" ] 2> /dev/null ||
   21     {
   22     echo "$0: a POSIX shell is required to run the tests"
   23     echo "Try bash -c \"$0 $1 $2\""
   24     exit 1
   25     }
   26 
   27 if [ -d tmp ] ; then rm -rf tmp ; fi
   28 mkdir tmp
   29 cd "${objdir}"/tmp || framework_failure
   30 
   31 cat "${testdir}"/test.txt > in || framework_failure
   32 in_lz="${testdir}"/test.txt.lz
   33 in_em="${testdir}"/test_em.txt.lz
   34 fox_lz="${testdir}"/fox.lz
   35 fail=0
   36 test_failed() { fail=1 ; printf " $1" ; [ -z "$2" ] || printf "($2)" ; }
   37 
   38 printf "testing lzip-%s..." "$2"
   39 
   40 "${LZIP}" -fkqm4 in
   41 [ $? = 1 ] || test_failed $LINENO
   42 [ ! -e in.lz ] || test_failed $LINENO
   43 "${LZIP}" -fkqm274 in
   44 [ $? = 1 ] || test_failed $LINENO
   45 [ ! -e in.lz ] || test_failed $LINENO
   46 for i in bad_size -1 0 4095 513MiB 1G 1T 1P 1E 1Z 1Y 10KB ; do
   47     "${LZIP}" -fkqs $i in
   48     [ $? = 1 ] || test_failed $LINENO $i
   49     [ ! -e in.lz ] || test_failed $LINENO $i
   50 done
   51 "${LZIP}" -lq in
   52 [ $? = 2 ] || test_failed $LINENO
   53 "${LZIP}" -tq in
   54 [ $? = 2 ] || test_failed $LINENO
   55 "${LZIP}" -tq < in
   56 [ $? = 2 ] || test_failed $LINENO
   57 "${LZIP}" -cdq in
   58 [ $? = 2 ] || test_failed $LINENO
   59 "${LZIP}" -cdq < in
   60 [ $? = 2 ] || test_failed $LINENO
   61 "${LZIP}" -dq -o in < "${in_lz}"
   62 [ $? = 1 ] || test_failed $LINENO
   63 "${LZIP}" -dq -o in "${in_lz}"
   64 [ $? = 1 ] || test_failed $LINENO
   65 "${LZIP}" -dq -o out nx_file.lz
   66 [ $? = 1 ] || test_failed $LINENO
   67 [ ! -e out ] || test_failed $LINENO
   68 "${LZIP}" -q -o out.lz nx_file
   69 [ $? = 1 ] || test_failed $LINENO
   70 [ ! -e out.lz ] || test_failed $LINENO
   71 "${LZIP}" -qf -S100k -o out in in
   72 [ $? = 1 ] || test_failed $LINENO
   73 # these are for code coverage
   74 "${LZIP}" -lt "${in_lz}" 2> /dev/null
   75 [ $? = 1 ] || test_failed $LINENO
   76 "${LZIP}" -cdl "${in_lz}" > out 2> /dev/null
   77 [ $? = 1 ] || test_failed $LINENO
   78 "${LZIP}" -cdt "${in_lz}" > out 2> /dev/null
   79 [ $? = 1 ] || test_failed $LINENO
   80 "${LZIP}" -t -- nx_file.lz 2> /dev/null
   81 [ $? = 1 ] || test_failed $LINENO
   82 "${LZIP}" -t "" < /dev/null 2> /dev/null
   83 [ $? = 1 ] || test_failed $LINENO
   84 "${LZIP}" --help > /dev/null || test_failed $LINENO
   85 "${LZIP}" -n1 -V > /dev/null || test_failed $LINENO
   86 "${LZIP}" -m 2> /dev/null
   87 [ $? = 1 ] || test_failed $LINENO
   88 "${LZIP}" -z 2> /dev/null
   89 [ $? = 1 ] || test_failed $LINENO
   90 "${LZIP}" --bad_option 2> /dev/null
   91 [ $? = 1 ] || test_failed $LINENO
   92 "${LZIP}" --t 2> /dev/null
   93 [ $? = 1 ] || test_failed $LINENO
   94 "${LZIP}" --test=2 2> /dev/null
   95 [ $? = 1 ] || test_failed $LINENO
   96 "${LZIP}" --output= 2> /dev/null
   97 [ $? = 1 ] || test_failed $LINENO
   98 "${LZIP}" --output 2> /dev/null
   99 [ $? = 1 ] || test_failed $LINENO
  100 printf "LZIP\001-.............................." | "${LZIP}" -t 2> /dev/null
  101 printf "LZIP\002-.............................." | "${LZIP}" -t 2> /dev/null
  102 printf "LZIP\001+.............................." | "${LZIP}" -t 2> /dev/null
  103 
  104 printf "\ntesting decompression..."
  105 
  106 for i in "${in_lz}" "${in_em}" ; do
  107     "${LZIP}" -lq "$i" || test_failed $LINENO "$i"
  108     "${LZIP}" -t "$i" || test_failed $LINENO "$i"
  109     "${LZIP}" -d "$i" -o copy || test_failed $LINENO "$i"
  110     cmp in copy || test_failed $LINENO "$i"
  111     "${LZIP}" -cd "$i" > copy || test_failed $LINENO "$i"
  112     cmp in copy || test_failed $LINENO "$i"
  113     "${LZIP}" -d "$i" -o - > copy || test_failed $LINENO "$i"
  114     cmp in copy || test_failed $LINENO "$i"
  115     "${LZIP}" -d < "$i" > copy || test_failed $LINENO "$i"
  116     cmp in copy || test_failed $LINENO "$i"
  117     rm -f copy || framework_failure
  118 done
  119 
  120 lines=$("${LZIP}" -tvv "${in_em}" 2>&1 | wc -l) || test_failed $LINENO
  121 [ "${lines}" -eq 8 ] || test_failed $LINENO "${lines}"
  122 
  123 lines=$("${LZIP}" -lvv "${in_em}" | wc -l) || test_failed $LINENO
  124 [ "${lines}" -eq 11 ] || test_failed $LINENO "${lines}"
  125 
  126 cat "${in_lz}" > copy.lz || framework_failure
  127 "${LZIP}" -dk copy.lz || test_failed $LINENO
  128 cmp in copy || test_failed $LINENO
  129 printf "to be overwritten" > copy || framework_failure
  130 "${LZIP}" -d copy.lz 2> /dev/null
  131 [ $? = 1 ] || test_failed $LINENO
  132 "${LZIP}" -df copy.lz || test_failed $LINENO
  133 [ ! -e copy.lz ] || test_failed $LINENO
  134 cmp in copy || test_failed $LINENO
  135 
  136 rm -f copy || framework_failure
  137 cat "${in_lz}" > copy.lz || framework_failure
  138 "${LZIP}" -d -S100k copy.lz || test_failed $LINENO  # ignore -S
  139 [ ! -e copy.lz ] || test_failed $LINENO
  140 cmp in copy || test_failed $LINENO
  141 
  142 printf "to be overwritten" > copy || framework_failure
  143 "${LZIP}" -df -o copy < "${in_lz}" || test_failed $LINENO
  144 cmp in copy || test_failed $LINENO
  145 rm -f out copy || framework_failure
  146 "${LZIP}" -d -o ./- "${in_lz}" || test_failed $LINENO
  147 cmp in ./- || test_failed $LINENO
  148 rm -f ./- || framework_failure
  149 "${LZIP}" -d -o ./- < "${in_lz}" || test_failed $LINENO
  150 cmp in ./- || test_failed $LINENO
  151 rm -f ./- || framework_failure
  152 
  153 cat "${in_lz}" > anyothername || framework_failure
  154 "${LZIP}" -dv - anyothername - < "${in_lz}" > copy 2> /dev/null ||
  155     test_failed $LINENO
  156 cmp in copy || test_failed $LINENO
  157 cmp in anyothername.out || test_failed $LINENO
  158 rm -f copy anyothername.out || framework_failure
  159 
  160 "${LZIP}" -lq in "${in_lz}"
  161 [ $? = 2 ] || test_failed $LINENO
  162 "${LZIP}" -lq nx_file.lz "${in_lz}"
  163 [ $? = 1 ] || test_failed $LINENO
  164 "${LZIP}" -tq in "${in_lz}"
  165 [ $? = 2 ] || test_failed $LINENO
  166 "${LZIP}" -tq nx_file.lz "${in_lz}"
  167 [ $? = 1 ] || test_failed $LINENO
  168 "${LZIP}" -cdq in "${in_lz}" > copy
  169 [ $? = 2 ] || test_failed $LINENO
  170 cat copy in | cmp in - || test_failed $LINENO
  171 "${LZIP}" -cdq nx_file.lz "${in_lz}" > copy
  172 [ $? = 1 ] || test_failed $LINENO
  173 cmp in copy || test_failed $LINENO
  174 rm -f copy || framework_failure
  175 cat "${in_lz}" > copy.lz || framework_failure
  176 for i in 1 2 3 4 5 6 7 ; do
  177     printf "g" >> copy.lz || framework_failure
  178     "${LZIP}" -alvv copy.lz "${in_lz}" > /dev/null 2>&1
  179     [ $? = 2 ] || test_failed $LINENO $i
  180     "${LZIP}" -atvvvv copy.lz "${in_lz}" 2> /dev/null
  181     [ $? = 2 ] || test_failed $LINENO $i
  182 done
  183 "${LZIP}" -dq in copy.lz
  184 [ $? = 2 ] || test_failed $LINENO
  185 [ -e copy.lz ] || test_failed $LINENO
  186 [ ! -e copy ] || test_failed $LINENO
  187 [ ! -e in.out ] || test_failed $LINENO
  188 "${LZIP}" -dq nx_file.lz copy.lz
  189 [ $? = 1 ] || test_failed $LINENO
  190 [ ! -e copy.lz ] || test_failed $LINENO
  191 [ ! -e nx_file ] || test_failed $LINENO
  192 cmp in copy || test_failed $LINENO
  193 
  194 cat in in > in2 || framework_failure
  195 "${LZIP}" -lq "${in_lz}" "${in_lz}" || test_failed $LINENO
  196 "${LZIP}" -t "${in_lz}" "${in_lz}" || test_failed $LINENO
  197 "${LZIP}" -cd "${in_lz}" "${in_lz}" -o out > copy2 || test_failed $LINENO
  198 [ ! -e out ] || test_failed $LINENO         # override -o
  199 cmp in2 copy2 || test_failed $LINENO
  200 rm -f copy2 || framework_failure
  201 "${LZIP}" -d "${in_lz}" "${in_lz}" -o copy2 || test_failed $LINENO
  202 cmp in2 copy2 || test_failed $LINENO
  203 rm -f copy2 || framework_failure
  204 
  205 cat "${in_lz}" "${in_lz}" > copy2.lz || framework_failure
  206 printf "\ngarbage" >> copy2.lz || framework_failure
  207 "${LZIP}" -tvvvv copy2.lz 2> /dev/null || test_failed $LINENO
  208 "${LZIP}" -alq copy2.lz
  209 [ $? = 2 ] || test_failed $LINENO
  210 "${LZIP}" -atq copy2.lz
  211 [ $? = 2 ] || test_failed $LINENO
  212 "${LZIP}" -atq < copy2.lz
  213 [ $? = 2 ] || test_failed $LINENO
  214 "${LZIP}" -adkq copy2.lz
  215 [ $? = 2 ] || test_failed $LINENO
  216 [ ! -e copy2 ] || test_failed $LINENO
  217 "${LZIP}" -adkq -o copy2 < copy2.lz
  218 [ $? = 2 ] || test_failed $LINENO
  219 [ ! -e copy2 ] || test_failed $LINENO
  220 printf "to be overwritten" > copy2 || framework_failure
  221 "${LZIP}" -df copy2.lz || test_failed $LINENO
  222 cmp in2 copy2 || test_failed $LINENO
  223 rm -f copy2 || framework_failure
  224 
  225 printf "\ntesting   compression..."
  226 
  227 "${LZIP}" -c -0 in in in -S100k -o out3.lz > copy2.lz || test_failed $LINENO
  228 [ ! -e out3.lz ] || test_failed $LINENO         # override -o and -S
  229 "${LZIP}" -0f in in --output=copy2.lz || test_failed $LINENO
  230 "${LZIP}" -d copy2.lz -o out2 || test_failed $LINENO
  231 cmp in2 out2 || test_failed $LINENO
  232 rm -f in2 out2 copy2.lz || framework_failure
  233 
  234 "${LZIP}" -cf "${in_lz}" > out 2> /dev/null # /dev/null is a tty on OS/2
  235 [ $? = 1 ] || test_failed $LINENO
  236 "${LZIP}" -Fvvm36 -o - "${in_lz}" > out 2> /dev/null || test_failed $LINENO
  237 "${LZIP}" -cd out | "${LZIP}" -d > copy || test_failed $LINENO
  238 cmp in copy || test_failed $LINENO
  239 
  240 "${LZIP}" -0 -o ./- in || test_failed $LINENO
  241 "${LZIP}" -cd ./- | cmp in - || test_failed $LINENO
  242 rm -f ./- || framework_failure
  243 "${LZIP}" -0 -o ./- < in || test_failed $LINENO         # add .lz
  244 [ ! -e ./- ] || test_failed $LINENO
  245 "${LZIP}" -cd -- -.lz | cmp in - || test_failed $LINENO
  246 rm -f ./-.lz || framework_failure
  247 
  248 for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do
  249     "${LZIP}" -k -$i in || test_failed $LINENO $i
  250     mv -f in.lz copy.lz || test_failed $LINENO $i
  251     printf "garbage" >> copy.lz || framework_failure
  252     "${LZIP}" -df copy.lz || test_failed $LINENO $i
  253     cmp in copy || test_failed $LINENO $i
  254 
  255     "${LZIP}" -$i in -c > out || test_failed $LINENO $i
  256     "${LZIP}" -$i in -o o_out || test_failed $LINENO $i # don't add .lz
  257     [ ! -e o_out.lz ] || test_failed $LINENO
  258     cmp out o_out || test_failed $LINENO $i
  259     rm -f o_out || framework_failure
  260     printf "g" >> out || framework_failure
  261     "${LZIP}" -cd out > copy || test_failed $LINENO $i
  262     cmp in copy || test_failed $LINENO $i
  263 
  264     "${LZIP}" -$i < in > out || test_failed $LINENO $i
  265     "${LZIP}" -d < out > copy || test_failed $LINENO $i
  266     cmp in copy || test_failed $LINENO $i
  267 
  268     rm -f out || framework_failure
  269     printf "to be overwritten" > out.lz || framework_failure
  270     "${LZIP}" -f -$i -o out < in || test_failed $LINENO $i  # add .lz
  271     [ ! -e out ] || test_failed $LINENO
  272     "${LZIP}" -df -o copy < out.lz || test_failed $LINENO $i
  273     cmp in copy || test_failed $LINENO $i
  274 done
  275 rm -f out out.lz || framework_failure
  276 
  277 cat in in in in in in in in > in8 || framework_failure
  278 "${LZIP}" -1s12 -S100k in8 || test_failed $LINENO
  279 "${LZIP}" -t in800001.lz in800002.lz || test_failed $LINENO
  280 "${LZIP}" -cd in800001.lz in800002.lz | cmp in8 - || test_failed $LINENO
  281 [ ! -e in800003.lz ] || test_failed $LINENO
  282 rm -f in800001.lz in800002.lz || framework_failure
  283 "${LZIP}" -1s12 -S100k -o out.lz in8 || test_failed $LINENO
  284 # ignore -S
  285 "${LZIP}" -d out.lz00001.lz out.lz00002.lz -S100k -o out || test_failed $LINENO
  286 cmp in8 out || test_failed $LINENO
  287 "${LZIP}" -t out.lz00001.lz out.lz00002.lz || test_failed $LINENO
  288 [ ! -e out.lz00003.lz ] || test_failed $LINENO
  289 rm -f out out.lz00001.lz out.lz00002.lz || framework_failure
  290 "${LZIP}" -1ks4Ki -b100000 in8 || test_failed $LINENO
  291 "${LZIP}" -t in8.lz || test_failed $LINENO
  292 "${LZIP}" -cd in8.lz -o out | cmp in8 - || test_failed $LINENO  # override -o
  293 [ ! -e out ] || test_failed $LINENO
  294 rm -f in8 || framework_failure
  295 "${LZIP}" -0 -S100k -o out < in8.lz || test_failed $LINENO
  296 "${LZIP}" -t out00001.lz out00002.lz || test_failed $LINENO
  297 "${LZIP}" -cd out00001.lz out00002.lz | cmp in8.lz - || test_failed $LINENO
  298 [ ! -e out00003.lz ] || test_failed $LINENO
  299 rm -f out00001.lz || framework_failure
  300 "${LZIP}" -1 -S100k -o out < in8.lz || test_failed $LINENO
  301 "${LZIP}" -t out00001.lz out00002.lz || test_failed $LINENO
  302 "${LZIP}" -cd out00001.lz out00002.lz | cmp in8.lz - || test_failed $LINENO
  303 [ ! -e out00003.lz ] || test_failed $LINENO
  304 rm -f out00001.lz out00002.lz || framework_failure
  305 "${LZIP}" -0 -F -S100k in8.lz || test_failed $LINENO
  306 "${LZIP}" -t in8.lz00001.lz in8.lz00002.lz || test_failed $LINENO
  307 "${LZIP}" -cd in8.lz00001.lz in8.lz00002.lz | cmp in8.lz - || test_failed $LINENO
  308 [ ! -e in8.lz00003.lz ] || test_failed $LINENO
  309 rm -f in8.lz00001.lz in8.lz00002.lz || framework_failure
  310 "${LZIP}" -0kF -b100k in8.lz || test_failed $LINENO
  311 "${LZIP}" -t in8.lz.lz || test_failed $LINENO
  312 "${LZIP}" -cd in8.lz.lz | cmp in8.lz - || test_failed $LINENO
  313 rm -f in8.lz in8.lz.lz || framework_failure
  314 
  315 printf "\ntesting bad input..."
  316 
  317 headers='LZIp LZiP LZip LzIP LzIp LziP lZIP lZIp lZiP lzIP'
  318 body='\001\014\000\203\377\373\377\377\300\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\000\000\000\000\000\000'
  319 cat "${in_lz}" > int.lz
  320 printf "LZIP${body}" >> int.lz
  321 if "${LZIP}" -tq int.lz ; then
  322     for header in ${headers} ; do
  323         printf "${header}${body}" > int.lz  # first member
  324         "${LZIP}" -lq int.lz
  325         [ $? = 2 ] || test_failed $LINENO ${header}
  326         "${LZIP}" -tq int.lz
  327         [ $? = 2 ] || test_failed $LINENO ${header}
  328         "${LZIP}" -tq < int.lz
  329         [ $? = 2 ] || test_failed $LINENO ${header}
  330         "${LZIP}" -cdq int.lz > /dev/null
  331         [ $? = 2 ] || test_failed $LINENO ${header}
  332         "${LZIP}" -lq --loose-trailing int.lz
  333         [ $? = 2 ] || test_failed $LINENO ${header}
  334         "${LZIP}" -tq --loose-trailing int.lz
  335         [ $? = 2 ] || test_failed $LINENO ${header}
  336         "${LZIP}" -tq --loose-trailing < int.lz
  337         [ $? = 2 ] || test_failed $LINENO ${header}
  338         "${LZIP}" -cdq --loose-trailing int.lz > /dev/null
  339         [ $? = 2 ] || test_failed $LINENO ${header}
  340         cat "${in_lz}" > int.lz
  341         printf "${header}${body}" >> int.lz # trailing data
  342         "${LZIP}" -lq int.lz
  343         [ $? = 2 ] || test_failed $LINENO ${header}
  344         "${LZIP}" -tq int.lz
  345         [ $? = 2 ] || test_failed $LINENO ${header}
  346         "${LZIP}" -tq < int.lz
  347         [ $? = 2 ] || test_failed $LINENO ${header}
  348         "${LZIP}" -cdq int.lz > /dev/null
  349         [ $? = 2 ] || test_failed $LINENO ${header}
  350         "${LZIP}" -lq --loose-trailing int.lz ||
  351             test_failed $LINENO ${header}
  352         "${LZIP}" -t --loose-trailing int.lz ||
  353             test_failed $LINENO ${header}
  354         "${LZIP}" -t --loose-trailing < int.lz ||
  355             test_failed $LINENO ${header}
  356         "${LZIP}" -cd --loose-trailing int.lz > /dev/null ||
  357             test_failed $LINENO ${header}
  358         "${LZIP}" -lq --loose-trailing --trailing-error int.lz
  359         [ $? = 2 ] || test_failed $LINENO ${header}
  360         "${LZIP}" -tq --loose-trailing --trailing-error int.lz
  361         [ $? = 2 ] || test_failed $LINENO ${header}
  362         "${LZIP}" -tq --loose-trailing --trailing-error < int.lz
  363         [ $? = 2 ] || test_failed $LINENO ${header}
  364         "${LZIP}" -cdq --loose-trailing --trailing-error int.lz > /dev/null
  365         [ $? = 2 ] || test_failed $LINENO ${header}
  366     done
  367 else
  368     printf "\nwarning: skipping header test: 'printf' does not work on your system."
  369 fi
  370 rm -f int.lz || framework_failure
  371 
  372 for i in fox_v2.lz fox_s11.lz fox_de20.lz \
  373          fox_bcrc.lz fox_crc0.lz fox_das46.lz fox_mes81.lz ; do
  374     "${LZIP}" -tq "${testdir}"/$i
  375     [ $? = 2 ] || test_failed $LINENO $i
  376 done
  377 
  378 "${LZIP}" -cd "${fox_lz}" > fox || test_failed $LINENO
  379 for i in fox_bcrc.lz fox_crc0.lz fox_das46.lz fox_mes81.lz ; do
  380     "${LZIP}" -cdq "${testdir}"/$i > out
  381     [ $? = 2 ] || test_failed $LINENO $i
  382     cmp fox out || test_failed $LINENO $i
  383 done
  384 rm -f fox out || framework_failure
  385 
  386 cat "${in_lz}" "${in_lz}" > in2.lz || framework_failure
  387 cat "${in_lz}" "${in_lz}" "${in_lz}" > in3.lz || framework_failure
  388 if dd if=in3.lz of=trunc.lz bs=14752 count=1 2> /dev/null &&
  389    [ -e trunc.lz ] && cmp in2.lz trunc.lz > /dev/null 2>&1 ; then
  390     for i in 6 20 14734 14753 14754 14755 14756 14757 14758 ; do
  391         dd if=in3.lz of=trunc.lz bs=$i count=1 2> /dev/null
  392         "${LZIP}" -lq trunc.lz
  393         [ $? = 2 ] || test_failed $LINENO $i
  394         "${LZIP}" -tq trunc.lz
  395         [ $? = 2 ] || test_failed $LINENO $i
  396         "${LZIP}" -tq < trunc.lz
  397         [ $? = 2 ] || test_failed $LINENO $i
  398         "${LZIP}" -cdq trunc.lz > out
  399         [ $? = 2 ] || test_failed $LINENO $i
  400         "${LZIP}" -dq < trunc.lz > out
  401         [ $? = 2 ] || test_failed $LINENO $i
  402     done
  403 else
  404     printf "\nwarning: skipping truncation test: 'dd' does not work on your system."
  405 fi
  406 rm -f in2.lz in3.lz trunc.lz out || framework_failure
  407 
  408 cat "${in_lz}" > ingin.lz || framework_failure
  409 printf "g" >> ingin.lz || framework_failure
  410 cat "${in_lz}" >> ingin.lz || framework_failure
  411 "${LZIP}" -lq ingin.lz
  412 [ $? = 2 ] || test_failed $LINENO
  413 "${LZIP}" -atq ingin.lz
  414 [ $? = 2 ] || test_failed $LINENO
  415 "${LZIP}" -atq < ingin.lz
  416 [ $? = 2 ] || test_failed $LINENO
  417 "${LZIP}" -acdq ingin.lz > out
  418 [ $? = 2 ] || test_failed $LINENO
  419 "${LZIP}" -adq < ingin.lz > out
  420 [ $? = 2 ] || test_failed $LINENO
  421 "${LZIP}" -t ingin.lz || test_failed $LINENO
  422 "${LZIP}" -t < ingin.lz || test_failed $LINENO
  423 "${LZIP}" -cd ingin.lz > copy || test_failed $LINENO
  424 cmp in copy || test_failed $LINENO
  425 "${LZIP}" -d < ingin.lz > copy || test_failed $LINENO
  426 cmp in copy || test_failed $LINENO
  427 rm -f copy ingin.lz out || framework_failure
  428 
  429 echo
  430 if [ ${fail} = 0 ] ; then
  431     echo "tests completed successfully."
  432     cd "${objdir}" && rm -r tmp
  433 else
  434     echo "tests failed."
  435 fi
  436 exit ${fail}