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

[PATCH] t0021: test application of both crlf and ident

From
Junio C Hamano <gitster@pobox.com>
Date
May 25, 2011, 02:18 UTC
Message-ID
<7vlixv5xqj.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<7vy61v612b.fsf@alter.siamese.dyndns.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * This comes on top of René's updates to the test. 
 t/t0021-conversion.sh |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 275421e..f19e651 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -66,10 +66,14 @@ test_expect_success expanded_in_repo '
 		echo "\$Id:NoSpaceAtEitherEnd\$"
 		echo "\$Id: NoTerminatingSymbol"
 		echo "\$Id: Foreign Commit With Spaces \$"
-		printf "\$Id: NoTerminatingSymbolAtEOF"
-	} > expanded-keywords &&
+	} >expanded-keywords.0 &&
 
-	git add expanded-keywords &&
+	{
+		cat expanded-keywords.0 &&
+		printf "\$Id: NoTerminatingSymbolAtEOF"
+	} >expanded-keywords &&
+	cat expanded-keywords >expanded-keywords-crlf &&
+	git add expanded-keywords expanded-keywords-crlf &&
 	git commit -m "File with keywords expanded" &&
 	id=$(git rev-parse --verify :expanded-keywords) &&
 
@@ -83,15 +87,27 @@ test_expect_success expanded_in_repo '
 		echo "\$Id: $id \$"
 		echo "\$Id: NoTerminatingSymbol"
 		echo "\$Id: Foreign Commit With Spaces \$"
+	} >expected-output.0 &&
+	{
+		cat expected-output.0 &&
 		printf "\$Id: NoTerminatingSymbolAtEOF"
-	} > expected-output &&
+	} >expected-output &&
+	{
+		append_cr <expected-output.0 &&
+		printf "\$Id: NoTerminatingSymbolAtEOF"
+	} >expected-output-crlf &&
+	{
+		echo "expanded-keywords ident"
+		echo "expanded-keywords-crlf ident text eol=crlf"
+	} >>.gitattributes &&
 
-	echo "expanded-keywords ident" >> .gitattributes &&
+	rm -f expanded-keywords expanded-keywords-crlf &&
 
-	rm -f expanded-keywords &&
 	git checkout -- expanded-keywords &&
-	cat expanded-keywords &&
-	cmp expanded-keywords expected-output
+	test_cmp expanded-keywords expected-output &&
+
+	git checkout -- expanded-keywords-crlf &&
+	test_cmp expanded-keywords-crlf expected-output-crlf
 '
 
 # The use of %f in a filter definition is expanded to the path to
-- 
1.7.5.2.483.gc61ca
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 12 in “streaming conversion API”
  1. 0/4 streaming conversion APIJunio C Hamano, May 21, 2011
  2. convert.h: move declarations for conversion from cache.hJunio C Hamano, May 21, 2011
  3. 2/4 Add streaming filter APIJunio C Hamano, May 21, 2011
  4. 3/4 Add LF-to-CRLF streaming conversionJunio C Hamano, May 21, 2011
  5. 4/4 streaming filter: ident filter and filter cascadingJunio C Hamano, May 21, 2011
  6. René ScharfeMay 21, 2011
  7. René ScharfeMay 21, 2011
  8. Junio C HamanoMay 25, 2011
  9. t0021: test application of both crlf and identJunio C Hamano, May 25, 2011
  10. streaming: filter cascadingJunio C Hamano, May 25, 2011
  11. René ScharfeMay 21, 2011
  12. Junio C HamanoMay 22, 2011

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.