Skip to content

Commit

Permalink
Fix S98Z test case and remove wrong emitter tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
  • Loading branch information
pantoniou committed Feb 11, 2020
1 parent 51424b6 commit 0713f3a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
6 changes: 6 additions & 0 deletions src/lib/fy-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2839,6 +2839,12 @@ int fy_fetch_block_scalar(struct fy_parser *fyp, bool is_literal, int c)
goto err_out;
}

if (empty && c == '#' && fyp->column > fyp->indent && chomp != FYAC_KEEP) {
FYP_MARK_ERROR(fyp, &handle.start_mark, &handle.end_mark, FYEM_SCAN,
"empty block scalar with wrongly indented comment line after spaces only");
goto err_out;
}

if (chomp_amt == (unsigned int)-1)
chomp_amt = current_indent;

Expand Down
5 changes: 0 additions & 5 deletions test/emitter-examples/block5.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions test/emitter-examples/block8.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions test/emitter-examples/block9.yaml

This file was deleted.

0 comments on commit 0713f3a

Please sign in to comment.