mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
builder: ignore spaces after repo identifiers (RHBZ#1506511)
This commit is contained in:
@@ -37,6 +37,7 @@ EXTRA_DIST = \
|
||||
test-virt-index-validate-good-1 \
|
||||
test-virt-index-validate-good-2 \
|
||||
test-virt-index-validate-good-3 \
|
||||
test-virt-index-validate-good-4 \
|
||||
virt-builder.pod \
|
||||
virt-index-validate.pod \
|
||||
yajl_tests.ml
|
||||
|
||||
@@ -78,8 +78,9 @@ extern void scanner_destroy (yyscan_t scanner);
|
||||
^\n { return EMPTY_LINE; }
|
||||
|
||||
/* [...] marks beginning of a section. */
|
||||
^"["[-A-Za-z0-9._]+"]"\n {
|
||||
yylval->str = strndup (yytext+1, yyleng-3);
|
||||
^"["[-A-Za-z0-9._]+"]"[[:blank:]]*\n {
|
||||
const char *end = strrchr (yytext, ']');
|
||||
yylval->str = strndup (yytext+1, end-yytext-1);
|
||||
return SECTION_HEADER;
|
||||
}
|
||||
|
||||
|
||||
3
builder/test-virt-index-validate-good-4
Normal file
3
builder/test-virt-index-validate-good-4
Normal file
@@ -0,0 +1,3 @@
|
||||
# Empty spaces after the repository identifier
|
||||
[foo]
|
||||
key=value
|
||||
@@ -23,3 +23,4 @@ set -e
|
||||
$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
|
||||
$VG virt-index-validate test-virt-index-validate-good-4
|
||||
|
||||
Reference in New Issue
Block a user