"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/sort.pl" between
ferm-2.5.1.tar.xz and ferm-2.6.tar.xz

About: ferm is a tool to maintain and setup complicated firewall rules.

sort.pl  (ferm-2.5.1.tar.xz):sort.pl  (ferm-2.6.tar.xz)
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# ferm, a firewall setup program that makes firewall rules easy! # ferm, a firewall setup program that makes firewall rules easy!
# #
# Copyright 2001-2017 Max Kellermann # Copyright 2001-2021 Max Kellermann
# #
# Bug reports and patches for this program may be sent to the GitHub # Bug reports and patches for this program may be sent to the GitHub
# repository: L<https://github.com/MaxKellermann/ferm> # repository: L<https://github.com/MaxKellermann/ferm>
# #
# This script sorts the tables and chains in ferm output so the # This script sorts the tables and chains in ferm output so the
# unit test suite can use "diff" to verify it. It's a kludge that is # unit test suite can use "diff" to verify it. It's a kludge that is
# necessary because ferm outputs these in random order (because Perl # necessary because ferm outputs these in random order (because Perl
# does). # does).
skipping to change at line 57 skipping to change at line 57
my $array = $rules{$key} ||= []; my $array = $rules{$key} ||= [];
push @$array, $_; push @$array, $_;
} elsif (/^COMMIT/) { } elsif (/^COMMIT/) {
my $key = $table . 'z'; my $key = $table . 'z';
my $array = $rules{$key} ||= []; my $array = $rules{$key} ||= [];
push @$array, $_; push @$array, $_;
} elsif (/^(:)(\S+)/ or /^-(A) (\S+)/) { } elsif (/^(:)(\S+)/ or /^-(A) (\S+)/) {
my $key = $table . $1 . $2; my $key = $table . $1 . $2;
my $array = $rules{$key} ||= []; my $array = $rules{$key} ||= [];
push @$array, $_; push @$array, $_;
} elsif (/^ebtables --atomic-file (\S+) (\N+)/) { } elsif (/^ebtables -t (\w+) --atomic-file (\S+) (\N+)/) {
my $key = $1; my $key = $2;
my $array = $rules{$key} ||= []; my $array = $rules{$key} ||= [];
push @$array, $_; push @$array, $_;
} else { } else {
die; die;
} }
} }
flush_output; flush_output;
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)