File: convert-seq-test

package info (click to toggle)
profphd-utils 1.0.10-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,972 kB
  • sloc: fortran: 32,780; perl: 124; makefile: 80; sh: 33; csh: 17
file content (33 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# autopkgtest check: build and run with default test data
# Author: Tatiana Malygina <merlettaia@gmail.com>

set -e

pkg=profphd-utils

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd $AUTOPKGTEST_TMP

cp -a /usr/share/doc/${pkg}/examples/* .
find . -type f -name "*.gz" -exec gunzip \{\} \;
for lnk in `find . -type l -name "*.gz"` ; do
    ln -s `basename $(readlink $lnk) .gz` `echo $lnk | sed 's/\.gz$//'`
    rm $lnk
done

# NOTE: following commands were used because convert_seq works in interactive 
# mode. Each `\n` means enter and corresponds to moving forward to next command.
# Thus, following calls emulate interactive mode.
# As stated in man page, program writes output to STDOUT.
# It means that in normal situation no errors should be produced.

echo "1ppt.hssp\nm\n\n\n\n" | convert_seq
[ -s 1ppt.msf ]

echo "1ppt.hssp\ny\n\n\n\n" | convert_seq
[ -s 1ppt.phy ]