1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/tests/test_files.sh
Lasse Collin b4943ccf73 Avoid using ! in test_files.sh, because that doesn't work
with some ancient /bin/sh versions.
2008-01-08 12:29:58 +02:00

42 lines
1.1 KiB
Bash
Executable file

#/bin/sh
###############################################################################
#
# Copyright (C) 2008 Lasse Collin
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
###############################################################################
for I in "$srcdir"/files/good-*.lzma
do
if ../src/lzmadec/lzmadec "$I" > /dev/null 2> /dev/null ; then
:
else
echo "Good file failed: $I"
(exit 1)
exit 1
fi
done
for I in "$srcdir"/files/bad-*.lzma
do
if ../src/lzmadec/lzmadec "$I" > /dev/null 2> /dev/null ; then
echo "Bad file succeeded: $I"
(exit 1)
exit 1
fi
done
# TODO: Test malicious files too, but with care.
(exit 0)
exit 0