From: Ben Pfaff Date: Thu, 16 Dec 2021 22:08:06 +0000 (-0800) Subject: num-out-cmp.pl: Remove unused script. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68822d68b12db1175aa3749997a48d1d84212540;hp=901d90ada6fe4c9cc1fb93855fd6d7012029f35c;p=pspp num-out-cmp.pl: Remove unused script. --- diff --git a/tests/automake.mk b/tests/automake.mk index 3f76cbc32a..7b5f9286be 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -295,7 +295,6 @@ EXTRA_DIST += \ tests/data/hotel-encrypted.sav \ tests/data/legacy-in.expected.cmp.gz \ tests/data/num-in.expected.gz \ - tests/data/num-out-cmp.pl \ tests/data/num-out.expected.cmp.gz \ tests/data/test-date-input.py \ tests/data/test-time-input.py \ diff --git a/tests/data/num-out-cmp.pl b/tests/data/num-out-cmp.pl deleted file mode 100644 index 1850fd6bf2..0000000000 --- a/tests/data/num-out-cmp.pl +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (C) 2020 Free Software Foundation - -# 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 3 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, see . - -use strict; -use warnings 'all'; - -my (@prev) = (); -our ($n) = 0; -our ($suffix) = ''; -our ($prefix) = ''; -while (<>) { - s/^ //; - if (scalar (my (@line) = /^([A-Z]+)(\d+)([^"]+")( *)([^%"]*)(%?")$/) == 6) { - if (defined ($prev[0]) - && $line[0] eq $prev[0] - && $line[1] == $prev[1] + 1 - && $line[2] eq $prev[2] - && $line[5] eq $prev[5]) { - if ($line[3] eq " $prev[3]" - && $line[4] eq $prev[4]) { - flush_prefix (); - flush_suffix (); - $n++; - } elsif ($line[3] eq $prev[3] - && length ($line[4]) == length ($prev[4]) + 1 - && $prev[4] eq substr ($line[4], 0, length ($line[4]) - 1)) { - flush_n (); - flush_prefix (); - $suffix .= substr ($line[4], -1); - } elsif ($line[3] eq $prev[3] - && $prev[4] eq substr ($line[4], 1)) { - flush_n (); - flush_suffix (); - $prefix .= substr ($line[4], 0, 1); - } else { - flush (); - print $_; - } - } else { - flush (); - print $_; - } - @prev = @line; - } else { - flush (); - print $_; - @prev = (); - } -} -flush (); - -sub flush_suffix { - if ($suffix ne '') { - print "\$$suffix\n"; - $suffix = ''; - } -} - -sub flush_prefix { - if ($prefix ne '') { - print "^$prefix\n"; - $prefix = ''; - } -} - -sub flush_n { - if ($n) { - print "*$n\n"; - $n = 0; - } -} - -sub flush { - flush_prefix (); - flush_suffix (); - flush_n (); -}