Commit 5e98acb5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Fix --ignore-info handling, add more parser tests

parent b0eb2aa4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ sub show_content {

		foreach my $part (@{$connection}) {
			foreach (@{$part->{extra}}) {
				if (not (defined $ignore_info and $_ =~ /$ignore_info/i)) {
				if (not (length($ignore_info) and $_ =~ /$ignore_info/i)) {
					print "# $_\n";
				}
			}
+25 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
use strict;
use warnings;
use 5.010;
use Test::Command tests => 57;
use Test::Command tests => 72;

my $efa     = 'bin/efa';
my $testarg = "E HBf MH HBf";
@@ -96,10 +96,33 @@ for my $opt (qw/-v --version/) {
}


for my $file (qw/e_hbf_mh_hbf e_hbf_du_hbf.ice/) {
for my $file (qw{
	e_hbf_mh_hbf
	e_hbf_du_hbf.ice
	e_werden_e_hbf
	e_hbf_b_hbf.ice
	e_martinstr_e_florastr
	})
{
	$cmd = Test::Command->new(cmd => "$efa $test_parse < test/dump_$file");

	$cmd->exit_is_num(0);
	$cmd->stdout_is_file("test/parse_$file");
	$cmd->stderr_is_eq('');
}

$cmd = Test::Command->new(
	cmd => "$efa $test_parse --ignore-info '.*' < test/dump_e_hbf_b_hbf.ice"
);

$cmd->exit_is_num(0);
$cmd->stdout_is_file("test/parse_e_hbf_b_hbf.ice.ignore_all");
$cmd->stderr_is_eq('');

$cmd = Test::Command->new(
	cmd => "$efa $test_parse --ignore-info < test/dump_e_hbf_mh_hbf"
);

$cmd->exit_is_num(0);
$cmd->stdout_is_file("test/parse_e_hbf_mh_hbf.ignore_none");
$cmd->stderr_is_eq('');
+765 −0

File added.

Preview size limit exceeded, changes collapsed.

+543 −0

File added.

Preview size limit exceeded, changes collapsed.

+539 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading