Hello community, here is the log from the commit of package ack for openSUSE:Factory checked in at 2019-08-22 10:54:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ack (Old) and /work/SRC/openSUSE:Factory/.ack.new.22127 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ack" Thu Aug 22 10:54:44 2019 rev:26 rq:725074 version:3.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ack/ack.changes 2019-08-05 10:42:50.459288764 +0200 +++ /work/SRC/openSUSE:Factory/.ack.new.22127/ack.changes 2019-08-22 10:54:52.069679793 +0200 @@ -1,0 +2,14 @@ +Wed Aug 21 13:12:17 UTC 2019 - Dan Čermák <dcer...@suse.com> + +- Rebase patches: + * ack-add_spec.patch + * ack-ignore-osc.patch + +------------------------------------------------------------------- +Wed Aug 21 12:11:56 UTC 2019 - Christopher Childress <christopher.childr...@dciinc.org> + +- ack 3.0.3: + * Made smartcase's check for lowercase patterns smarter. + * Updated many URLs, especially in the config. (GH #223) + +------------------------------------------------------------------- Old: ---- ack-v3.0.2.tar.gz New: ---- ack-v3.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ack.spec ++++++ --- /var/tmp/diff_new_pack.j78zxx/_old 2019-08-22 10:54:53.617679585 +0200 +++ /var/tmp/diff_new_pack.j78zxx/_new 2019-08-22 10:54:53.617679585 +0200 @@ -24,13 +24,13 @@ %endif %{!?perl_make_install: %global perl_make_install make DESTDIR=%{buildroot} install_vendor} Name: ack -Version: 3.0.2 +Version: 3.0.3 Release: 0 Summary: Grep-Like Text Finder License: Artistic-2.0 Group: Productivity/Text/Utilities URL: https://beyondgrep.com/ -Source: http://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v%{version}.tar.gz +Source: https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v%{version}.tar.gz Patch1: ack-ignore-osc.patch Patch3: ack-add_spec.patch BuildRequires: make ++++++ ack-add_spec.patch ++++++ --- /var/tmp/diff_new_pack.j78zxx/_old 2019-08-22 10:54:53.641679581 +0200 +++ /var/tmp/diff_new_pack.j78zxx/_new 2019-08-22 10:54:53.641679581 +0200 @@ -22,5 +22,5 @@ +--type-add=rpm:ext:spec + # Ruby - # http://www.ruby-lang.org/ + # https://www.ruby-lang.org/ --type-add=ruby:ext:rb,rhtml,rjs,rxml,erb,rake,spec ++++++ ack-ignore-osc.patch ++++++ --- /var/tmp/diff_new_pack.j78zxx/_old 2019-08-22 10:54:53.649679580 +0200 +++ /var/tmp/diff_new_pack.j78zxx/_new 2019-08-22 10:54:53.649679580 +0200 @@ -15,14 +15,14 @@ --- ack-v3.0.2.orig/lib/App/Ack/ConfigDefault.pm +++ ack-v3.0.2/lib/App/Ack/ConfigDefault.pm @@ -70,6 +70,9 @@ sub _options_block { - # http://mercurial.selenic.com/ + # https://www.mercurial-scm.org/ --ignore-directory=is:.hg +# openSUSE Commander +--ignore-directory=is:.osc + - # quilt - # http://directory.fsf.org/wiki/Quilt + # Quilt + # https://directory.fsf.org/wiki/Quilt --ignore-directory=is:.pc Index: ack-v3.0.2/t/ack-dump.t =================================================================== ++++++ ack-v3.0.2.tar.gz -> ack-v3.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/Changes new/ack-v3.0.3/Changes --- old/ack-v3.0.2/Changes 2019-07-05 04:42:48.000000000 +0200 +++ new/ack-v3.0.3/Changes 2019-08-21 06:42:25.000000000 +0200 @@ -1,5 +1,15 @@ History file for ack 3. https://beyondgrep.com/ + +v3.0.3 Tue Aug 20 23:42:02 CDT 2019 +======================================== +[FIXES] +Made smartcase's check for lowercase patterns smarter. + +[DOCUMENTATION] +Updated many URLs, especially in the config. (GH #223) + + v3.0.2 Thu Jul 4 21:42:43 CDT 2019 ======================================== [FIXES] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/LICENSE.md new/ack-v3.0.3/LICENSE.md --- old/ack-v3.0.2/LICENSE.md 2018-01-02 05:28:45.000000000 +0100 +++ new/ack-v3.0.3/LICENSE.md 2019-08-21 06:41:14.000000000 +0200 @@ -1,6 +1,6 @@ ack is released under the [Artistic License 2.0][1]. -[1]: http://www.perlfoundation.org/artistic_license_2_0 +[1]: https://www.perlfoundation.org/artistic-license-20.html Artistic License 2.0 ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/META.json new/ack-v3.0.3/META.json --- old/ack-v3.0.2/META.json 2019-07-05 05:18:05.000000000 +0200 +++ new/ack-v3.0.3/META.json 2019-08-21 06:43:20.000000000 +0200 @@ -4,13 +4,13 @@ "Andy Lester <a...@petdance.com>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.143240", + "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "ack", "no_index" : { @@ -61,7 +61,7 @@ }, "homepage" : "https://beyondgrep.com/", "license" : [ - "http://www.perlfoundation.org/artistic_license_2_0" + "https://www.perlfoundation.org/artistic-license-20.html" ], "repository" : { "type" : "git", @@ -69,5 +69,6 @@ }, "x_MailingList" : "https://groups.google.com/group/ack-users" }, - "version" : "v3.0.2" + "version" : "v3.0.3", + "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/META.yml new/ack-v3.0.3/META.yml --- old/ack-v3.0.2/META.yml 2019-07-05 05:18:05.000000000 +0200 +++ new/ack-v3.0.3/META.yml 2019-08-21 06:43:20.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.143240' +generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -41,6 +41,7 @@ MailingList: https://groups.google.com/group/ack-users bugtracker: https://github.com/beyondgrep/ack3 homepage: https://beyondgrep.com/ - license: http://www.perlfoundation.org/artistic_license_2_0 + license: https://www.perlfoundation.org/artistic-license-20.html repository: git://github.com/beyondgrep/ack3.git -version: v3.0.2 +version: v3.0.3 +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/Makefile.PL new/ack-v3.0.3/Makefile.PL --- old/ack-v3.0.2/Makefile.PL 2019-07-05 04:41:16.000000000 +0200 +++ new/ack-v3.0.3/Makefile.PL 2019-08-21 06:41:14.000000000 +0200 @@ -19,7 +19,7 @@ resources => { homepage => 'https://beyondgrep.com/', bugtracker => 'https://github.com/beyondgrep/ack3', - license => 'http://www.perlfoundation.org/artistic_license_2_0', + license => 'https://www.perlfoundation.org/artistic-license-20.html', repository => 'git://github.com/beyondgrep/ack3.git', MailingList => 'https://groups.google.com/group/ack-users', }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/ack new/ack-v3.0.3/ack --- old/ack-v3.0.2/ack 2019-07-05 04:41:16.000000000 +0200 +++ new/ack-v3.0.3/ack 2019-08-21 06:42:32.000000000 +0200 @@ -4,7 +4,7 @@ use warnings; use version; -our $VERSION = version->declare( 'v3.0.2' ); # Check https://beyondgrep.com/ for updates +our $VERSION = version->declare( 'v3.0.3' ); # Check https://beyondgrep.com/ for updates use 5.010001; @@ -52,6 +52,9 @@ # Flag if we need any context tracking. our $is_tracking_context; +# Special /m version of our $opt_regex. +our $line_scan_regex; + our @special_vars_used_by_opt_output; MAIN: { @@ -315,7 +318,7 @@ } else { # Check for the pattern in what we got. - $needs_line_scan = ($buffer =~ /$opt_regex/mo); + $needs_line_scan = ($buffer =~ /$line_scan_regex/o); } if ( $needs_line_scan ) { $file->reset(); @@ -403,11 +406,11 @@ return sub { if ( $opt_g ) { - if ( $File::Next::name =~ /$opt_regex/ && $opt_v ) { - return 0; + if ( $File::Next::name =~ /$opt_regex/o ) { + return 0 if $opt_v; } - if ( $File::Next::name !~ /$opt_regex/ && !$opt_v ) { - return 0; + else { + return 0 if !$opt_v; } } # ack always selects files that are specified on the command @@ -557,13 +560,17 @@ $str = "(?i)$str"; } - my $re = eval { qr/$str/m }; - if ( !$re ) { + my $re = eval { qr/$str/ }; + if ( $re ) { + $line_scan_regex = eval { qr/$str/m }; + } + if ( !$re || !$line_scan_regex ) { my $err = $@; chomp $err; App::Ack::die( "Invalid regex '$str':\n $err" ); } + return $re; } @@ -1028,9 +1035,9 @@ PATTERN is a Perl regular expression. Perl regular expressions are commonly found in other programming languages, but for the particulars of their behavior, please consult -L<http://perldoc.perl.org/perlreref.html|perlreref>. If you don't know +L<https://perldoc.perl.org/perlreref.html|perlreref>. If you don't know how to use regular expression but are interested in learning, you may -consult L<http://perldoc.perl.org/perlretut.html|perlretut>. If you do not +consult L<https://perldoc.perl.org/perlretut.html|perlretut>. If you do not need or want ack to use regular expressions, please see the C<-Q>/C<--literal> option. @@ -1979,15 +1986,15 @@ =item * The ack announcements mailing list -L<http://groups.google.com/group/ack-announcement> +L<https://groups.google.com/group/ack-announcement> =item * The ack users' mailing list -L<http://groups.google.com/group/ack-users> +L<https://groups.google.com/group/ack-users> =item * The ack development mailing list -L<http://groups.google.com/group/ack-users> +L<https://groups.google.com/group/ack-users> =back @@ -2233,7 +2240,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0. -See http://www.perlfoundation.org/artistic_license_2_0 or the LICENSE.md +See https://www.perlfoundation.org/artistic-license-20.html or the LICENSE.md file that comes with the ack distribution. =cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/lib/App/Ack/ConfigDefault.pm new/ack-v3.0.3/lib/App/Ack/ConfigDefault.pm --- old/ack-v3.0.2/lib/App/Ack/ConfigDefault.pm 2019-05-28 06:11:04.000000000 +0200 +++ new/ack-v3.0.3/lib/App/Ack/ConfigDefault.pm 2019-08-21 06:41:14.000000000 +0200 @@ -46,52 +46,52 @@ ### Directories to ignore # Bazaar -# http://bazaar.canonical.com/ +# https://bazaar.canonical.com/ --ignore-directory=is:.bzr # Codeville -# http://freecode.com/projects/codeville +# http://freshmeat.sourceforge.net/projects/codeville --ignore-directory=is:.cdv # Interface Builder (Xcode) -# http://en.wikipedia.org/wiki/Interface_Builder +# https://en.wikipedia.org/wiki/Interface_Builder --ignore-directory=is:~.dep --ignore-directory=is:~.dot --ignore-directory=is:~.nib --ignore-directory=is:~.plst # Git -# http://git-scm.com/ +# https://git-scm.com/ --ignore-directory=is:.git # When submodules are used, .git is a file. --ignore-file=is:.git # Mercurial -# http://mercurial.selenic.com/ +# https://www.mercurial-scm.org/ --ignore-directory=is:.hg -# quilt -# http://directory.fsf.org/wiki/Quilt +# Quilt +# https://directory.fsf.org/wiki/Quilt --ignore-directory=is:.pc # Subversion -# http://subversion.tigris.org/ +# https://subversion.apache.org/ --ignore-directory=is:.svn # Monotone -# http://www.monotone.ca/ +# https://www.monotone.ca/ --ignore-directory=is:_MTN # CVS -# http://savannah.nongnu.org/projects/cvs +# https://savannah.nongnu.org/projects/cvs --ignore-directory=is:CVS # RCS -# http://www.gnu.org/software/rcs/ +# https://www.gnu.org/software/rcs/ --ignore-directory=is:RCS # SCCS -# http://en.wikipedia.org/wiki/Source_Code_Control_System +# https://en.wikipedia.org/wiki/Source_Code_Control_System --ignore-directory=is:SCCS # darcs @@ -102,7 +102,7 @@ --ignore-directory=is:_sgbak # autoconf -# http://www.gnu.org/software/autoconf/ +# https://www.gnu.org/software/autoconf/ --ignore-directory=is:autom4te.cache # Perl module building @@ -117,15 +117,15 @@ --ignore-directory=is:node_modules # CMake cache -# http://www.cmake.org/ +# https://www.cmake.org/ --ignore-directory=is:CMakeFiles # Eclipse workspace folder -# http://eclipse.org/ +# https://eclipse.org/ --ignore-directory=is:.metadata # Cabal (Haskell) sandboxes -# http://www.haskell.org/cabal/users-guide/installing-packages.html +# https://www.haskell.org/cabal/users-guide/installing-packages.html --ignore-directory=is:.cabal-sandbox ### Files to ignore @@ -168,7 +168,7 @@ ### Filetypes defined # Makefiles -# http://www.gnu.org/s/make/ +# https://www.gnu.org/s/make/ --type-add=make:ext:mk --type-add=make:ext:mak --type-add=make:is:makefile @@ -178,11 +178,11 @@ --type-add=make:is:GNUmakefile # Rakefiles -# http://rake.rubyforge.org/ +# https://rake.rubyforge.org/ --type-add=rake:is:Rakefile # CMake -# http://www.cmake.org/ +# https://cmake.org/ --type-add=cmake:is:CMakeLists.txt --type-add=cmake:ext:cmake @@ -190,15 +190,15 @@ --type-add=actionscript:ext:as,mxml # Ada -# http://www.adaic.org/ +# https://www.adaic.org/ --type-add=ada:ext:ada,adb,ads # ASP -# http://msdn.microsoft.com/en-us/library/aa286483.aspx +# https://docs.microsoft.com/en-us/previous-versions/office/developer/server-technologies/aa286483(v=msdn.10) --type-add=asp:ext:asp # ASP.Net -# http://www.asp.net/ +# https://dotnet.microsoft.com/apps/aspnet --type-add=aspx:ext:master,ascx,asmx,aspx,svc # Assembly @@ -208,11 +208,11 @@ --type-add=batch:ext:bat,cmd # ColdFusion -# http://en.wikipedia.org/wiki/ColdFusion +# https://en.wikipedia.org/wiki/ColdFusion --type-add=cfmx:ext:cfc,cfm,cfml # Clojure -# http://clojure.org/ +# https://clojure.org/ --type-add=clojure:ext:clj,cljs,edn,cljc # C @@ -223,7 +223,7 @@ --type-add=hh:ext:h # CoffeeScript -# http://coffeescript.org/ +# https://coffeescript.org/ --type-add=coffeescript:ext:coffee # C++ @@ -236,43 +236,43 @@ --type-add=csharp:ext:cs # CSS -# http://www.w3.org/Style/CSS/ +# https://www.w3.org/Style/CSS/ --type-add=css:ext:css # Dart -# http://www.dartlang.org/ +# https://dart.dev/ --type-add=dart:ext:dart # Delphi -# http://en.wikipedia.org/wiki/Embarcadero_Delphi +# https://en.wikipedia.org/wiki/Embarcadero_Delphi --type-add=delphi:ext:pas,int,dfm,nfm,dof,dpk,dproj,groupproj,bdsgroup,bdsproj # Elixir -# http://elixir-lang.org/ +# https://elixir-lang.org/ --type-add=elixir:ext:ex,exs # Emacs Lisp -# http://www.gnu.org/software/emacs +# https://www.gnu.org/software/emacs --type-add=elisp:ext:el # Erlang -# http://www.erlang.org/ +# https://www.erlang.org/ --type-add=erlang:ext:erl,hrl # Fortran -# http://en.wikipedia.org/wiki/Fortran +# https://en.wikipedia.org/wiki/Fortran --type-add=fortran:ext:f,f77,f90,f95,f03,for,ftn,fpp # Go -# http://golang.org/ +# https://golang.org/ --type-add=go:ext:go # Groovy -# http://groovy.codehaus.org/ +# https://www.groovy-lang.org/ --type-add=groovy:ext:groovy,gtmpl,gpp,grunit,gradle # GSP -# http://groovy.codehaus.org/GSP +# https://gsp.grails.org/ --type-add=gsp:ext:gsp # Haskell @@ -287,18 +287,18 @@ --type-add=jade:ext:jade # Java -# http://www.oracle.com/technetwork/java/index.html +# https://www.oracle.com/technetwork/java/index.html --type-add=java:ext:java,properties # JavaScript --type-add=js:ext:js # JSP -# http://www.oracle.com/technetwork/java/javaee/jsp/index.html +# https://www.oracle.com/technetwork/java/javaee/jsp/index.html --type-add=jsp:ext:jsp,jspx,jspf,jhtm,jhtml # JSON -# http://www.json.org/ +# https://json.org/ --type-add=json:ext:json # Kotlin @@ -310,11 +310,11 @@ --type-add=less:ext:less # Common Lisp -# http://common-lisp.net/ +# https://common-lisp.net/ --type-add=lisp:ext:lisp,lsp # Lua -# http://www.lua.org/ +# https://www.lua.org/ --type-add=lua:ext:lua --type-add=lua:firstlinematch:/^#!.*\blua(jit)?/ @@ -326,7 +326,7 @@ # You are free to add your own in your ackrc file. # Matlab -# http://en.wikipedia.org/wiki/MATLAB +# https://en.wikipedia.org/wiki/MATLAB --type-add=matlab:ext:m # Objective-C @@ -336,7 +336,7 @@ --type-add=objcpp:ext:mm,h # OCaml -# http://caml.inria.fr/ +# https://ocaml.org/ --type-add=ocaml:ext:ml,mli,mll,mly # Parrot @@ -355,21 +355,21 @@ --type-add=pod:ext:pod # PHP -# http://www.php.net/ +# https://www.php.net/ --type-add=php:ext:php,phpt,php3,php4,php5,phtml --type-add=php:firstlinematch:/^#!.*\bphp/ # Plone -# http://plone.org/ +# https://plone.org/ --type-add=plone:ext:pt,cpt,metadata,cpy,py # Python -# http://www.python.org/ +# https://www.python.org/ --type-add=python:ext:py --type-add=python:firstlinematch:/^#!.*\bpython/ # R -# http://www.r-project.org/ +# https://www.r-project.org/ --type-add=rr:ext:R # reStructured Text @@ -377,25 +377,25 @@ --type-add=rst:ext:rst # Ruby -# http://www.ruby-lang.org/ +# https://www.ruby-lang.org/ --type-add=ruby:ext:rb,rhtml,rjs,rxml,erb,rake,spec --type-add=ruby:is:Rakefile --type-add=ruby:firstlinematch:/^#!.*\bruby/ # Rust -# http://www.rust-lang.org/ +# https://www.rust-lang.org/ --type-add=rust:ext:rs # Sass -# http://sass-lang.com +# https://sass-lang.com --type-add=sass:ext:sass,scss # Scala -# http://www.scala-lang.org/ +# https://www.scala-lang.org/ --type-add=scala:ext:scala # Scheme -# http://groups.csail.mit.edu/mac/projects/scheme/ +# https://groups.csail.mit.edu/mac/projects/scheme/ --type-add=scheme:ext:scm,ss # Shell @@ -407,15 +407,15 @@ --type-add=smalltalk:ext:st # Smarty -# http://www.smarty.net/ +# https://www.smarty.net/ --type-add=smarty:ext:tpl # SQL -# http://www.iso.org/iso/catalogue_detail.htm?csnumber=45498 +# https://www.iso.org/standard/45498.html --type-add=sql:ext:sql,ctl # Stylus -# http://learnboost.github.io/stylus/ +# http://stylus-lang.com/ --type-add=stylus:ext:styl # SVG @@ -428,19 +428,19 @@ --type-add=swift:firstlinematch:/^#!.*\bswift/ # Tcl -# http://www.tcl.tk/ +# https://www.tcl.tk/ --type-add=tcl:ext:tcl,itcl,itk # TeX & LaTeX -# http://www.latex-project.org/ +# https://www.latex-project.org/ --type-add=tex:ext:tex,cls,sty # Template Toolkit (Perl) -# http://template-toolkit.org/ +# http//template-toolkit.org/ --type-add=ttml:ext:tt,tt2,ttml # Typescript -# http://www.typescriptlang.org/ +# https://www.typescriptlang.org/ --type-add=ts:ext:ts,tsx # Visual Basic @@ -454,16 +454,16 @@ --type-add=vhdl:ext:vhd,vhdl # Vim -# http://www.vim.org/ +# https://www.vim.org/ --type-add=vim:ext:vim # XML -# http://www.w3.org/TR/REC-xml/ +# https://www.w3.org/TR/REC-xml/ --type-add=xml:ext:xml,dtd,xsd,xsl,xslt,ent,wsdl --type-add=xml:firstlinematch:/<[?]xml/ # YAML -# http://yaml.org/ +# https://yaml.org/ --type-add=yaml:ext:yaml,yml HERE $lines =~ s/==VERSION==/$App::Ack::VERSION/sm; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/lib/App/Ack/File.pm new/ack-v3.0.3/lib/App/Ack/File.pm --- old/ack-v3.0.2/lib/App/Ack/File.pm 2019-01-04 06:41:44.000000000 +0100 +++ new/ack-v3.0.3/lib/App/Ack/File.pm 2019-08-21 06:41:14.000000000 +0200 @@ -63,12 +63,7 @@ sub basename { my ( $self ) = @_; - # XXX Definedness? Pre-populate the slot with an undef? - unless ( exists $self->{basename} ) { - $self->{basename} = (File::Spec->splitpath($self->name))[2]; - } - - return $self->{basename}; + return $self->{basename} //= (File::Spec->splitpath($self->name))[2]; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/lib/App/Ack.pm new/ack-v3.0.3/lib/App/Ack.pm --- old/ack-v3.0.2/lib/App/Ack.pm 2019-07-05 04:41:16.000000000 +0200 +++ new/ack-v3.0.3/lib/App/Ack.pm 2019-08-21 06:42:43.000000000 +0200 @@ -17,7 +17,7 @@ our $COPYRIGHT; BEGIN { use version; - $VERSION = version->declare( 'v3.0.2' ); # Check https://beyondgrep.com/ for updates + $VERSION = version->declare( 'v3.0.3' ); # Check https://beyondgrep.com/ for updates $COPYRIGHT = 'Copyright 2005-2019 Andy Lester.'; } our $STANDALONE = 0; @@ -676,7 +676,7 @@ } } - # http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/Subroutines/ProhibitReturnSort.pm + # https://metacpan.org/pod/distribution/Perl-Critic/lib/Perl/Critic/Policy/Subroutines/ProhibitReturnSort.pm @matches = sort @matches; return @matches; } @@ -703,6 +703,7 @@ |\\K # Keep to the left |\\N(\{.+?\})? # Anything but \n, OR Unicode sequence |\\[pP]\{.+?\} # Named property and negation + |\\[pP][A-Z] # Named property and negation, single-character shorthand |\\R # Linebreak |\\S # Non-space character |\\V # Not vertical whitespace diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/t/Util.pm new/ack-v3.0.3/t/Util.pm --- old/ack-v3.0.2/t/Util.pm 2019-06-26 03:48:36.000000000 +0200 +++ new/ack-v3.0.3/t/Util.pm 2019-08-21 06:41:14.000000000 +0200 @@ -1175,9 +1175,9 @@ | Unknown\ escape\ E<0x[[:xdigit:]]+> | - stty:\ stdin\ isn't\ a\ terminal + stdin\ isn't\ a\ terminal | - stty:\ standard\ input:\ Inappropriate\ ioctl\ for\ device + Inappropriate\ ioctl\ for\ device }x } @{$stderr} ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/t/ack-k.t new/ack-v3.0.3/t/ack-k.t --- old/ack-v3.0.2/t/ack-k.t 2018-01-02 05:28:45.000000000 +0100 +++ new/ack-v3.0.3/t/ack-k.t 2019-08-21 06:41:14.000000000 +0200 @@ -28,8 +28,6 @@ }; subtest 'Only known types' => sub { - local $TODO = '-k not added yet'; - my $expected = <<'HERE'; t/etc/buttonhook.xml.xxx => xml t/etc/shebang.php.xxx => php diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/t/ack-passthru.t new/ack-v3.0.3/t/ack-passthru.t --- old/ack-v3.0.2/t/ack-passthru.t 2018-01-02 05:28:45.000000000 +0100 +++ new/ack-v3.0.3/t/ack-passthru.t 2019-08-21 06:41:14.000000000 +0200 @@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 6; +use Test::More tests => 4; use lib 't'; use Util; @@ -13,28 +13,34 @@ my @full_speech = <DATA>; chomp @full_speech; -NORMAL: { +subtest 'Normal' => sub { + plan tests => 2; + my @expected = line_split( <<'HERE' ); Now we are engaged in a great civil war, testing whether that nation, on a great battle-field of that war. We have come to dedicate a portion HERE + @expected = color_match( qr/war/, @expected ); + my @files = qw( t/text/gettysburg.txt ); - my @args = qw( war ); + my @args = qw( war --color ); my @results = run_ack( @args, @files ); lists_match( \@results, \@expected, 'Search for war' ); -} +}; -DASH_C: { - my @expected = @full_speech; +subtest 'With --passthru' => sub { + plan tests => 2; + + my @expected = color_match( qr/war/, @full_speech ); my @files = qw( t/text/gettysburg.txt ); - my @args = qw( war --passthru ); + my @args = qw( war --passthru --color ); my @results = run_ack( @args, @files ); lists_match( \@results, \@expected, q{Still lookin' for war, in passthru mode} ); -} +}; SKIP: { @@ -53,6 +59,22 @@ done_testing(); exit 0; + +sub color_match { + my $re = shift; + my @lines = @_; + + for my $line ( @lines ) { + if ( $line =~ /$re/ ) { + $line =~ s/($re)/\e[30;43m$1\e[0m/g; + $line .= "\e[0m\e[K"; + } + } + + return @lines; +} + + __DATA__ Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/t/lowercase.t new/ack-v3.0.3/t/lowercase.t --- old/ack-v3.0.2/t/lowercase.t 2019-07-05 05:06:10.000000000 +0200 +++ new/ack-v3.0.3/t/lowercase.t 2019-08-21 06:41:14.000000000 +0200 @@ -31,8 +31,14 @@ not vertical whitespace -> \V not horizontal whitespace -> \H linebreak -> \R + +# unicode regex metachars +# https://www.regular-expressions.info/unicode.html named property -> \p{Word} same as \w not the named property -> \P{Word} same as \W +single-character named property shorthand -> \pL is any letter +negation of single-character named property shorthand -> \PL is not any letter + # Not sure about \X big combination: \W\S\D\V\H\R but still lowercase diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ack-v3.0.2/xt/man.t new/ack-v3.0.3/xt/man.t --- old/ack-v3.0.2/xt/man.t 2018-09-07 00:50:58.000000000 +0200 +++ new/ack-v3.0.3/xt/man.t 2019-08-21 06:41:14.000000000 +0200 @@ -32,7 +32,8 @@ diag explain $man_stderr; } else { - is( $man_stderr->[0], 'stty: standard input: Inappropriate ioctl for device', 'The one warning is one we can ignore' ); + # Sometimes "standard input" is in single quotes, and sometimes it's not. + like( $man_stderr->[0], qr/stty: '?standard input'?: Inappropriate ioctl for device/, 'The one warning is one we can ignore' ); } my $in_options_section;