gash/tests/spec/check-spec

37 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# Gash --- Guile As SHell
# Copyright © 2018 Timothy Sample <samplet@ngyro.com>
#
# This file is part of Gash.
#
# Gash 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.
#
# Gash 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 Gash. If not, see <http://www.gnu.org/licenses/>.
cd oil
export OSH_LIST=bin/gash
test_name=$(basename "$1")
test_name=${test_name%.sh}
test_name=${test_name%.test}
# This just makes sure that Python 2 produces UTF-8 output when
# redirected to a file (as in the case of our test harness). There is
# a specific issue that this resolves. Guile sometimes prints
# ellipses as part of its stack traces. If Python 2 thinks that it
# should only write ASCII to files, it will throw an error when it
# sees an ellipsis.
export PYTHONIOENCODING=utf-8
./test/spec.sh "$test_name" --verbose