git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 1/3] tests: Prepare --textconv tests for correctly-failing conversion program

From
Kirill Smelkov <kirr@landau.phys.spbu.ru>
Date
Sep 28, 2010, 12:41 UTC
Message-ID
<20100928124148.GA29882@landau.phys.spbu.ru>
In-Reply-To
<20100928122031.GC29525@landau.phys.spbu.ru>
On Tue, Sep 28, 2010 at 04:20:31PM +0400, Kirill Smelkov wrote:
Show 19 quoted lines
> On Tue, Sep 28, 2010 at 04:07:22PM +0400, Kirill Smelkov wrote:
> > diff --git a/t/t4042-diff-textconv-caching.sh b/t/t4042-diff-textconv-caching.sh
> > index 68fee12..6aaa10b 100755
> > --- a/t/t4042-diff-textconv-caching.sh
> > +++ b/t/t4042-diff-textconv-caching.sh
> > @@ -5,8 +5,8 @@ test_description='test textconv caching'
> >  
> >  cat >helper <<'EOF'
> >  #!/bin/sh
> > -grep -q '^bin: ' "$@" || { echo "E: $@ is not \"binary\" file" 1>&2; exit 1; }
> > -sed 's/^bin: /converted: /' "$@" >helper.out
> > +grep -q '^bin: ' "$1" || { echo "E: $1 is not \"binary\" file" 1>&2; exit 1; }
> > +sed 's/^bin: /converted: /' "$1" >helper.out
> >  cat helper.out
> >  EOF
> >  chmod +x helper
> 
> Please ignore this - changing so breaks textconv cache tests in this
> file.
Ok, here is what also is needed here
---- 8< ----
    NOTE: in t4042, I had to correct args hack, and just roll second
    textconv helper for cache-invalidates-on-textconv-change test.
    ...
diff --git a/t/t4042-diff-textconv-caching.sh b/t/t4042-diff-textconv-caching.sh
index 6aaa10b..c362261 100755
--- a/t/t4042-diff-textconv-caching.sh
+++ b/t/t4042-diff-textconv-caching.sh
@@ -9,7 +9,12 @@ grep -q '^bin: ' "$1" || { echo "E: $1 is not \"binary\" file" 1>&2; exit 1; }
 sed 's/^bin: /converted: /' "$1" >helper.out
 cat helper.out
 EOF
-chmod +x helper
+cat >helper2 <<'EOF'
+#!/bin/sh
+echo "converted: other"
+./helper "$1"
+EOF
+chmod +x helper helper2
 
 test_expect_success 'setup' '
 	echo "bin: foo content 1" >foo.bin &&
@@ -77,8 +82,7 @@ index 255496b..ad450ff 100644
 +converted: foo content 2
 EOF
 test_expect_success 'changing textconv invalidates cache' '
-	echo "bin: other" >other &&
-	git config diff.magic.textconv "./helper other" &&
+	git config diff.magic.textconv ./helper2 &&
 	git diff HEAD^ HEAD >actual &&
 	test_cmp expect actual
 '
Previous: Kirill SmelkovNext: Jeff King
Message 6 of 18 in “Fix {blame,cat-file} --textconv for cases with symlinks”
  1. 0/3 Fix {blame,cat-file} --textconv for cases with symlinksKirill Smelkov, Sep 24, 2010
  2. 1/3 tests: Prepare --textconv tests for correctly-failing conversion programKirill Smelkov, Sep 24, 2010
  3. Junio C HamanoSep 27, 2010
  4. Kirill SmelkovSep 28, 2010
  5. Kirill SmelkovSep 28, 2010
  6. Kirill SmelkovSep 28, 2010
  7. Jeff KingSep 28, 2010
  8. Kirill SmelkovSep 28, 2010
  9. Jeff KingSep 28, 2010
  10. Kirill SmelkovSep 28, 2010
  11. Junio C HamanoSep 28, 2010
  12. Jeff KingSep 28, 2010
  13. Kirill SmelkovSep 28, 2010
  14. Kirill SmelkovSep 29, 2010
  15. 2/3 blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinksKirill Smelkov, Sep 24, 2010
  16. Junio C HamanoSep 27, 2010
  17. Kirill SmelkovSep 28, 2010
  18. 3/3 blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''Kirill Smelkov, Sep 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.