tests: Add a regression test for RHBZ#957772.

This commit is contained in:
Richard W.M. Jones
2013-04-29 15:22:34 +01:00
parent c5f356a603
commit cc93840d31
2 changed files with 34 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ TESTS = \
rhbz811649.sh \
rhbz895904.sh \
rhbz914931 \
rhbz957772.sh \
test-noexec-stack.pl
tests_not_run = \

33
tests/regressions/rhbz957772.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash -
# libguestfs
# Copyright (C) 2013 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 2 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Regression test for:
# https://bugzilla.redhat.com/show_bug.cgi?id=957772
# Ensure that tar-out and base64-out commands properly quote arguments.
set -e
export LANG=C
../../fish/guestfish -N fs -m /dev/sda1 <<EOF
mkdir "/test 1"
touch "/test 2"
tar-out "/test 1" /dev/null
base64-out "/test 2" /dev/null
EOF
rm test1.img