File: run-unit-test

package info (click to toggle)
libmcfp 1.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 304 kB
  • sloc: cpp: 1,573; sh: 20; makefile: 8
file content (29 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
set -e
set -x

pkg="libmcfp-dev"

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

cp -r /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP

cmake .
cmake --build .

./example x -c a -c b -a 3 -b 4.1 > ./example.out

cat > ./example.ref <<'EOF'
The first operand is x
Text option is foo
a (3) * b (4.1) = 12.3
c: a
c: b
EOF

exec cmp -s ./example.out ./example.ref