• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mknos / PerlPowerTools
70%
master: 62%

Build:
Build:
LAST BUILD BRANCH: head-nplus
DEFAULT BRANCH: master
Repo Added 30 Sep 2023 04:59AM UTC
Token bpVpM03EQtpGlGDaXBN8IcfxiVSvQJoTJ regen
Build 3606 Last
Files 24
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH patch-ctx-range
branch: patch-ctx-range
CHANGE BRANCH
x
Reset
Sync Branches
  • patch-ctx-range
  • addbib-0file
  • addbib-ed
  • addbib-gcvar
  • addbib-reopen
  • addbib-shell
  • apply-a
  • apply-dflag
  • apply-max
  • apply-needarg
  • apply-oddarg
  • apply-runcmd
  • apply-system
  • ar-aflag
  • ar-binmode
  • ar-continue
  • ar-filehandle
  • ar-getopt
  • ar-printentry
  • ar-qflag
  • ar-readfail
  • ar-strict
  • ar-strict2
  • ar-strict3
  • ar-strmode
  • ar-t404
  • ar-tv-octmode
  • ar-usage
  • arch-compat
  • arith-getopt
  • arithmetic-typo
  • asa-filedash
  • awk-tmpfile3
  • banner-const
  • banner-getopt
  • base64-close
  • basename-dash2
  • basename-dirname
  • basename-suffix
  • bc-bignum-exp
  • bc-cleanup2
  • bc-dash
  • bc-div0
  • bc-doc
  • bc-errloop
  • bc-file0
  • bc-flooridx
  • bc-gcvar
  • bc-gcvar2
  • bc-mathlibx
  • bc-minarg
  • bc-mod0
  • bc-newpod
  • bc-require
  • bc-setarray
  • bc-sigint
  • bc-symtype
  • bc-trig
  • bc-unknown-func
  • bc-yyerr
  • bc-yyparse-cb
  • cal-currmon
  • cal-gcvar
  • cal-getopt
  • cal-split
  • cal-usage
  • cal-warnings
  • cat-bn
  • cat-close
  • cat-question
  • cat-raw
  • cat-ver
  • chgrp-emptygrp
  • chgrp-gid
  • chgrp-opt-end
  • chgrp-stat
  • chmod-chown-opt
  • chmod-err-lsfile
  • chmod-exitcode
  • chmod-modsync
  • chmod-readlink
  • chmod-usage
  • chown-emptystr
  • chown-filename
  • chown-num-gid
  • chown-uid
  • clear-ospeed
  • cmp-argc
  • cmp-checklen
  • cmp-eof
  • cmp-exit
  • cmp-getopt
  • cmp-hexlit
  • cmp-man
  • cmp-oct
  • cmp-skipnum
  • cmp-stdin
  • cmp-sysread
  • cmp-unpack
  • cmp-usage
  • col-buffer
  • col-checknum
  • col-escapes
  • col-hflag
  • col-lflag
  • col-nofile
  • col-tidy
  • col-usage
  • col-ver
  • colrm-print
  • comm-stdin
  • comm-strict
  • cp-dashdash
  • cp-filecopy
  • cp-gclib
  • cp-iprompt
  • cp-optbundl
  • cp-srcdir
  • cp-sysexit
  • cp-usage
  • cut-bfix
  • cut-bflag
  • cut-checknum
  • cut-exit
  • cut-f-field
  • cut-field0
  • cut-getopt
  • cut-optb-optf
  • cut-overlapb
  • cut-range1
  • date-e-space
  • date-quarter
  • date-tidy
  • date-usage
  • dc-strict
  • deroff-stdin
  • diff-catfile
  • diff-contextlen
  • diff-deadsub
  • diff-ed
  • diff-edparam
  • diff-empty2
  • diff-getopt
  • diff-lcsmatrix
  • diff-output-ed
  • diff-qcompat
  • diff-s
  • diff-stdin
  • diff-stdindir
  • diff-strict
  • diff-style2
  • dirname-dash2
  • dirname-pod
  • du-badenv
  • du-exitcode
  • du-notraverse
  • du-opendir-202512
  • du-stat
  • du-unixpath
  • du-usage
  • ed-0w
  • ed-badfile
  • ed-bytecount
  • ed-calcline1
  • ed-cleanup
  • ed-cmdret
  • ed-cmdtab
  • ed-debugstr
  • ed-dflag
  • ed-e-s
  • ed-ededit
  • ed-edhelp
  • ed-edinsert
  • ed-editorder
  • ed-edread
  • ed-edsubs
  • ed-emptyfile
  • ed-emptyfile2
  • ed-eof1
  • ed-epipe
  • ed-escline
  • ed-exitcode
  • ed-f-dir
  • ed-f-dot
  • ed-file404
  • ed-fname
  • ed-g-savpat
  • ed-gcvar
  • ed-getaddr-max
  • ed-getaddr-nomatch
  • ed-getaddr-re
  • ed-getaddr-re2
  • ed-global
  • ed-globalname
  • ed-gnd
  • ed-gns
  • ed-hat
  • ed-icmd-range
  • ed-illegal-file
  • ed-inputfunc
  • ed-lcmd2
  • ed-maddr
  • ed-mark
  • ed-mark0
  • ed-move-tidy
  • ed-nesc
  • ed-newline
  • ed-nl
  • ed-nomatch
  • ed-parsebas
  • ed-parsebas2
  • ed-percent
  • ed-pipe
  • ed-pipebuf
  • ed-plusn-addr
  • ed-prefix-g
  • ed-r-fname
  • ed-readaddr
  • ed-rel-line
  • ed-repeat
  • ed-repeat2
  • ed-rtidy
  • ed-s-compat
  • ed-s-compat2
  • ed-scmd
  • ed-search3
  • ed-searchback
  • ed-searchforward
  • ed-semicolon
  • ed-setcurline
  • ed-shortrange
  • ed-snomatch
  • ed-terminated-line
  • ed-tidy
  • ed-trailingspace
  • ed-undo
  • ed-undo2
  • ed-unsaved
  • ed-vcmd
  • ed-vflag
  • ed-w-pipe
  • ed-w-savefile
  • ed-wq2
  • env-optend
  • env-u-202512
  • env-usage
  • expand-backsp
  • expand-badincr
  • expand-copy
  • expand-dash2
  • expand-slurp
  • expand-stdin
  • expand-tabstop
  • expr-dash2
  • expr-div0
  • expr-eqalias
  • expr-new
  • expr-plusprefx
  • expr-strict
  • factor-die
  • factor-pod
  • fgrep-c
  • fgrep-fname
  • fgrep-i-list
  • fgrep-stdin
  • file-flist
  • file-stdin
  • file-wrongerr
  • find-longerr
  • find-pod
  • fish-deckinit
  • fish-eof
  • fish-gcvar
  • fish-shuffle
  • fmt-direxit
  • fmt-exitcode
  • fmt-getopt
  • fmt-getopt2
  • fmt-minw
  • fmt-new
  • fold-assert
  • fold-bsloop
  • fold-bytefunc
  • fold-getopt
  • fold-stdin
  • fold-terminator
  • fortune-abspath
  • fortune-blacklist
  • fortune-getopt
  • fortune-optv
  • fortune-sleep
  • glob-dead
  • glob-debug
  • glob-dirsep
  • glob-err-msg
  • glob-gcvar2
  • glob-mac
  • glob-proto
  • glob-tilde
  • glob-tildeusr
  • grep-0
  • grep-Fx
  • grep-Ig
  • grep-Lflag
  • grep-binary
  • grep-closure
  • grep-context
  • grep-ctxa
  • grep-dash
  • grep-docs
  • grep-emptypat
  • grep-env
  • grep-env2
  • grep-f-cleanup
  • grep-f-empty
  • grep-f0
  • grep-fempty
  • grep-fgrep
  • grep-fgrep2
  • grep-filehandle
  • grep-h
  • grep-highlight
  • grep-many-ef
  • grep-max
  • grep-para
  • grep-parseargs
  • grep-pod-e-f
  • grep-qshort
  • grep-r-catfile
  • grep-r-nosort
  • grep-r2
  • grep-sflag
  • grep-shell
  • grep-sq
  • grep-stdinmsg
  • grep-study
  • grep-tflag
  • grep-tidy
  • grep-ver
  • grep-warnqq
  • grep-zgrep
  • hangman-202512
  • hangman-eof
  • hangman-wordlist
  • hangman-words
  • head-close
  • head-dashed
  • head-n-202512
  • head-nplus
  • head-num
  • hexdump-dir
  • hexdump-factor
  • hexdump-factor2
  • hexdump-file0
  • hexdump-uflag
  • hexdump-vflag
  • id-aflag
  • id-exit
  • id-groot
  • id-help
  • id-root
  • id-troppo
  • install-Mflag
  • install-bak
  • install-m0
  • install-mod
  • install-msym
  • install-nulmode
  • install-subdir
  • install-uid0
  • install-unix
  • install-usage1
  • install-usage2
  • join-av
  • join-dashdash
  • join-decl
  • join-h
  • join-stdin
  • join-usage
  • kill-badsig
  • kill-lflag
  • kill-numsig
  • kill-regex2
  • kill-sigcheck
  • kill-usage
  • ln-1arg
  • ln-getopt
  • ln-version
  • lock-echo
  • lock-usage
  • look-1file
  • look-exitcode
  • look-loops
  • ls-R-columns
  • ls-closedir
  • ls-columns
  • ls-default-1
  • ls-filearg
  • ls-getcols
  • ls-mywarn-202512
  • ls-newline-202512
  • ls-stat-bug
  • ls-strict
  • ls-totals
  • ls-var-alias
  • ls-version
  • ls-w-202603
  • mail-eof
  • mail-exit
  • mail-f-usage
  • mail-mbox-write
  • mail-msg-idx
  • mail-msg0
  • mail-opt-f
  • mail-strict
  • mail-tmpfile
  • mail-trimcmd
  • mail-ver
  • mail-vipath
  • mail-visual
  • mail-zero-id
  • master
  • maze-getopt
  • maze-prompt
  • maze-usage
  • mkdir-errstr-202512
  • mkdir-mode
  • mkdir-octmode
  • mkdir-p-err
  • mkdir-version
  • mkfifo-continue
  • mkfifo-getmode
  • mkfifo-mode
  • mknos-nl-b0
  • moo-correct
  • moo-eof
  • moo-range-max
  • moo-usage
  • morse-foldcase
  • morse-runtime
  • morse-symfix
  • nl-close
  • nl-nol
  • nl-s0
  • nl-usage
  • nl-validtype
  • nl-version
  • od-D
  • od-aflag
  • od-b
  • od-bigb
  • od-defmode
  • od-dumpline
  • od-dupeline
  • od-eflag
  • od-files
  • od-glbl-len
  • od-hex4
  • od-hflag
  • od-o4
  • od-offset
  • od-pad0
  • od-short
  • od-t-more
  • od-t-x8
  • od-tf
  • od-tx124
  • par-badopt
  • paste-dash
  • paste-loop
  • paste-loop2
  • paste-mod
  • paste-noarg
  • patch-2type
  • patch-Dval
  • patch-apply3
  • patch-chdir
  • patch-ctx-eof
  • patch-devnull
  • patch-dir2
  • patch-dryrun
  • patch-ed-acmd
  • patch-ed-range
  • patch-edcmd
  • patch-edend
  • patch-edpipe
  • patch-exitcode
  • patch-fuzznum
  • patch-getopt
  • patch-ifdef-doc
  • patch-norm-arange
  • patch-norm-badrange
  • patch-objdata
  • patch-odash
  • patch-outopen
  • patch-repeat-eof
  • patch-reverse-check
  • patch-stdin
  • patch-strict
  • patch-throw-oo
  • perlpowertools-404
  • perlpowertools-hexdump
  • pig-sync
  • pig-vflag
  • ping-usage
  • pom-badenv
  • pom-getopt
  • pom-stdlib
  • pr-3x
  • pr-aflag
  • pr-checknum
  • pr-col0
  • pr-header
  • pr-loop
  • pr-margin
  • pr-opt-end
  • pr-stdin
  • primes-end0
  • primes-interactive
  • primes-range
  • primes-usage
  • primes-valid
  • printenv-pod
  • printenv-question
  • printf-badfmt
  • printf-hex
  • pwd-dash2
  • pwd-getcwd
  • random-compat
  • random-gcvar
  • rm-chmod
  • rm-fname-dash
  • rm-longopt
  • rm-par
  • rm-podusage
  • rm-prompt-ro
  • rm-usage
  • rmdir-err
  • rmdir-stat
  • shar-binfile
  • shar-dep
  • shar-dir
  • shar-dirty
  • shar-find
  • shar-quot
  • sleep-extra
  • sort-dir
  • sort-manual
  • sort-o
  • sort-usage
  • sort-yvalid
  • spell-close
  • spell-extralist
  • spell-gcvar
  • spell-interactive
  • spell-varalias
  • split-dead
  • split-help
  • split-p0
  • split-stdinfix
  • split-strict
  • split-valid
  • strings-count
  • strings-n10
  • strings-stdin
  • sum-a-and-o
  • sum-progname
  • sum-sha
  • sum-sha3
  • tac-bufsz
  • tac-exitcode
  • tac-getopt2
  • tac-usage
  • tac-usage2
  • tail-bundle
  • tail-checknum
  • tail-continue
  • tail-dirarg
  • tail-f-catfile
  • tail-header
  • tail-hflag
  • tail-incompat-opt
  • tail-n-202606
  • tail-n0
  • tail-notf-dir
  • tail-r-default
  • tail-refargs
  • tailf-sig
  • tar-dir
  • tar-extract
  • tar-stdin
  • tar-usage
  • tee-dashdash
  • tee-iflag
  • tee-n
  • tee-nflag
  • tee-open
  • tee-strict
  • tee-unbuffer
  • tee-unbuffer2
  • touch-dir
  • touch-exitcode
  • touch-fflag
  • touch-r0
  • touch-rt
  • touch-t0
  • touch-typo
  • tr-cc
  • tr-del
  • tr-getopt
  • tr-nobug
  • truefalseopt
  • tsort-pairs
  • tsort-pairs2
  • tsort-presence
  • tsort-stdin
  • uname-args
  • unespand-dashdash
  • unexpand-slurp
  • unexpand-stdin
  • unexpand-usage
  • uniq-checknum
  • uniq-files
  • uniq-optend
  • uniq-pod
  • uniq-pod-202512
  • uniq-usage
  • units-badfile
  • units-div0
  • units-file
  • units-gcvar
  • units-usage
  • unshar-usage
  • uudecode-iflag
  • uuencode-dir
  • uuencode-stdin
  • wc-basename
  • wc-c-cw
  • wc-exitcode
  • wc-getopt
  • wc-wflag
  • what-dir
  • what-dup
  • what-exit
  • what-fname
  • what-matchtxt
  • what-nest
  • what-sflag
  • what-stdin
  • which-dirsep
  • which-exitcode
  • which-noarg
  • which-silent
  • whoami-argc
  • whoami-fact
  • words-2arg
  • words-dir
  • wump-decl
  • wump-gcvar
  • xargs-eof
  • xargs-man
  • xargs-optl
  • xargs-stdin
  • xargs0
  • yes-bsd
  • zgrep

05 Mar 2025 01:38AM UTC coverage: 70.088% (-0.9%) from 70.951%
13666605702

push

github

web-flow
patch: crash for invalid context diff input

* I generated a Context diff with 2 hunks
* I manually swapped the 2 numbers at the top of hunk1, from "1,4" to "4,1" (the line number range for the hunk)
* GNU patch correctly rejected this invalid diff, but this version crashed with an ARRAY error
* Add validation for backwards range, based on code previously added for Normal diffs

%cat diff.ctx 
*** id	Wed Mar  5 09:16:33 2025
--- id2	Wed Mar  5 09:14:36 2025
***************
*** 4,1 ****
- #!/usr/bin/perl
  
  =begin metadata
  
--- 1,3 ----
***************
*** 12,24 ****
  =cut
  
  
- #
- # An implementation of the 'id' utility in Perl.  Written for the Perl Power
- # Tools (PPT) project by Theo Van Dinter (felicity@kluge.net).
- #
- # $Id: id,v 1.2 2004/08/05 14:17:43 cwest Exp $
- #
- 
  use strict;
  
  use File::Basename qw(basename);
--- 11,16 ----

%perl -Mwarnings -Mdiagnostics  patch -c id diff.ctx
Hmm...  Looks like a context diff to me...
Patching file id using Plan A...
Short hunk ignored...no second line range.
1 out of 1 hunks ignored--saving rejects to id.rej

Can't use an undefined value as an ARRAY reference at patch line 382, <$in_fh>
	line 249 (#1)
    (F) A value used as either a hard reference or a symbolic reference must
    be a defined value.  This helps to delurk some insidious errors.
    
Uncaught exception from user code:
	Can't use an undefined value as an ARRAY reference at patch line 382, <$in_fh> line 249.
	Patch::bless(Patch::Context=HASH(0x55908a4f50)) called at patch line 161

396 of 565 relevant lines covered (70.09%)

4016.41 hits per line

Relevant lines Covered
Build:
Build:
565 RELEVANT LINES 396 COVERED LINES
4016.41 HITS PER LINE
Source Files on patch-ctx-range
  • Tree
  • List 4
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
13666605702 patch-ctx-range patch: crash for invalid context diff input * I generated a Context diff with 2 hunks * I manually swapped the 2 numbers at the top of hunk1, from "1,4" to "4,1" (the line number range for the hunk) * GNU patch correctly rejected this invalid d... push 05 Mar 2025 01:42AM UTC web-flow github
70.09
13666605704 patch-ctx-range patch: crash for invalid context diff input * I generated a Context diff with 2 hunks * I manually swapped the 2 numbers at the top of hunk1, from "1,4" to "4,1" (the line number range for the hunk) * GNU patch correctly rejected this invalid d... push 05 Mar 2025 01:41AM UTC web-flow github
70.95
13666605704 patch-ctx-range push 05 Mar 2025 01:41AM UTC github
70.09
See All Builds (3605)

Badge your Repo: PerlPowerTools

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc