Files
libguestfs/builder/test-virt-index-validate.sh
Pino Toscano fc6c16af0b builder: handle empty lines in indexes before first section (RHBZ#1201526)
Properly skip empty lines before the first section, otherwise they will
trigger a syntax error in parsing.

Add a simple test for it, so it doesn't regress.
2015-03-23 12:49:27 +00:00

26 lines
1.0 KiB
Bash
Executable File

#!/bin/bash -
# test virt-index-validate
# Copyright (C) 2014 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.
export LANG=C
set -e
! $VG virt-index-validate test-virt-index-validate-bad-1
$VG virt-index-validate test-virt-index-validate-good-1
$VG virt-index-validate test-virt-index-validate-good-2
$VG virt-index-validate test-virt-index-validate-good-3