diff options
author | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2019-08-28 14:28:40 +0200 |
---|---|---|
committer | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2019-08-28 14:28:40 +0200 |
commit | 26bea900a531662c6028ecc06f4adea825658434 (patch) | |
tree | 1db3d30bddc8b8336fa7a8f2bf5a3615001071e1 /tests/parser.sh | |
parent | e527f54afdf27ab8ce73a22d05d69e5482f5e92b (diff) | |
download | libtasn1-26bea900a531662c6028ecc06f4adea825658434.tar.gz libtasn1-26bea900a531662c6028ecc06f4adea825658434.tar.bz2 libtasn1-26bea900a531662c6028ecc06f4adea825658434.zip |
Imported Upstream version 4.14upstream/4.14
Diffstat (limited to 'tests/parser.sh')
-rwxr-xr-x | tests/parser.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/parser.sh b/tests/parser.sh new file mode 100755 index 0000000..b8924e4 --- /dev/null +++ b/tests/parser.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Copyright (C) 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +PARSER="${PARSER:-../src/asn1Parser${EXEEXT}}" +srcdir="${srcdir:-.}" +TMPFILE=pkix.asn.$$.tmp + +${PARSER} ${srcdir}/pkix.asn -o ${TMPFILE} + +if test $? != 0;then + echo "Cannot generate C file!" + exit 1 +fi + +diff --strip-trailing-cr ${TMPFILE} ${srcdir}/pkix.asn.out + +if test $? != 0;then + echo "Generated C file differs!" + exit 1 +fi + +rm -f ${TMPFILE} + +exit 0 |