From d940cf045c4e777d37b19ee4639623f2c4a7e062 Mon Sep 17 00:00:00 2001 From: Jim Meyering
Date: Sun, 5 Jul 2015 11:43:47 -0700 Subject: [PATCH] tests: add a test for the performance fix * tests/long-pattern-perf: New file. * tests/Makefile.am (TESTS): Add it. --- tests/Makefile.am | 1 + tests/long-pattern-perf | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100755 tests/long-pattern-perf diff --git a/tests/Makefile.am b/tests/Makefile.am index 629d322..c95d5a9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -80,6 +80,7 @@ TESTS = \ khadafy \ kwset-abuse \ long-line-vs-2GiB-read \ + long-pattern-perf \ match-lines \ max-count-overread \ max-count-vs-context \ diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf new file mode 100755 index 0000000..cba6553 --- /dev/null +++ b/tests/long-pattern-perf @@ -0,0 +1,50 @@ +#!/bin/sh +# grep-2.21 would incur a 100x penalty for 10x increase in regexp length + +# Copyright 2015 Free Software Foundation, Inc. + +# 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