Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

-i: "Hunk #1 FAILED at 1." error #42

Open
greg-minshall opened this issue Feb 10, 2022 · 0 comments
Open

-i: "Hunk #1 FAILED at 1." error #42

greg-minshall opened this issue Feb 10, 2022 · 0 comments

Comments

@greg-minshall
Copy link

hi (and many thanks for cram!). my .t file looks like

some backref errors

  $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\2/') < /dev/null

  $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\g{2}/') < /dev/null

  $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\g{1/') < /dev/null

and, my .t.err file is

some backref errors

  $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\2/') < /dev/null
  /dev/fd/63:1: backreference "\2" too high (1 max)
  [3]

  $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\g{2}/') < /dev/null
  /dev/fd/63:1: backreference "\2" too high (1 max)
  [3]

  $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\g{1/') < /dev/null
  /dev/fd/63:1: unable to find backreference closing ("}") in "\g{1"
  [3]

the cram run looks like

bash apollo2 (main): {50016} cram -i tests/cram/sed-backref.t
!
--- tests/cram/sed-backref.t
+++ tests/cram/sed-backref.t.err
@@ -1,7 +1,13 @@
 some backref errors

   $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\2/') < /dev/null
+  /dev/fd/63:1: backreference "\2" too high (1 max)
+  [3]

   $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\g{2}/') < /dev/null
+  /dev/fd/63:1: backreference "\2" too high (1 max)
+  [3]

   $ cd ${TESTDIR}/../.. && ./sedcsv -f <(echo 's/(this)/\g{1/') < /dev/null
+  /dev/fd/63:1: unable to find backreference closing ("}") in "\g{1"
+  [3]
Accept this change? [yN] y
patching file tests/cram/sed-backref.t
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file tests/cram/sed-backref.t.rej
tests/cram/sed-backref.t: merge failed

# Ran 1 tests, 0 skipped, 1 failed.

i'm on an up-to-date arch linux. patch(1) is

bash apollo2 (master): {49628} patch --version
GNU patch 2.7.6
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall

cheers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant