File: testargparser.sh

package info (click to toggle)
libmaus2 2.0.768%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 17,940 kB
  • sloc: cpp: 286,279; sh: 2,978; makefile: 2,624; ansic: 1,303
file content (36 lines) | stat: -rwxr-xr-x 827 bytes parent folder | download | duplicates (4)
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
34
35
36
#! /bin/bash
SCRIPTDIR=`dirname "${BASH_SOURCE[0]}"`
pushd ${SCRIPTDIR}
SCRIPTDIR=`pwd`
popd

function expectedoutput64
{
cat <<EOF
QXJnUGFyc2VyKHByb2duYW1lPXRlc3RhcmdwYXJzZXI7a3ZhcmdzPXsoSSx2YWx1ZSkobSw1ayko
c3BsaXRhLDUpfTtyZXN0YXJncz1bYTtiO2M7NTs2XSkKYXJnWzBdPWEKYXJnWzFdPWIKYXJnWzJd
PWMKYXJnWzNdPTUKYXJnWzRdPTYKNQo2CnZhbHVlCjUKNTEyMAo=
EOF
}

source ${SCRIPTDIR}/base64decode.sh

../src/testargparser -Ivalue --splita5 -m5k a b c 5 6 2>&1 | sed "s|progname=.*testargparser|progname=testargparser|" >testargparser.output
RET=$?

if test $RET -ne 0 ; then
	rm -f testargparser.output
	exit $RET
fi

expectedoutput64 | base64 ${BASE64DEC} > testargparser.output.ref

cmp -s testargparser.output testargparser.output.ref

RET=$?

rm -f testargparser.output testargparser.output.ref

echo "Exiting with code ${RET}"

exit ${RET}