git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Steffen Prohaska <prohaska@zib.de>
To: git@vger.kernel.org, torvalds@linux-foundation.org, gitster@pobox.com
Cc: Steffen Prohaska <prohaska@zib.de>
Subject: [PATCH] tests: added d2u to have unix style testfiles even in textmode
Date: Wed,  8 Aug 2007 00:49:07 +0200	[thread overview]
Message-ID: <11865269472121-git-send-email-prohaska@zib.de> (raw)
In-Reply-To: <11865269472595-git-send-email-prohaska@zib.de>

This is needed if the content of files is compared with
precomputed sha1s or stored expected results.

***WARNING***
This patch is useful for testing and illustrating the problem
but not thought to be applied to any official git branch.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 t/t0000-basic.sh      |    2 +-
 t/t0020-crlf.sh       |    8 ++++----
 t/t0021-conversion.sh |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 4e49d59..bf71ce6 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -91,7 +91,7 @@ test_expect_success \
 mkdir path2 path3 path3/subp3
 for p in path0 path2/file2 path3/file3 path3/subp3/file3
 do
-    echo "hello $p" >$p
+    echo "hello $p" | d2u >$p
     ln -s "hello $p" ${p}sym
 done
 test_expect_success \
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index fe1dfd0..52dc739 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -21,10 +21,10 @@ test_expect_success setup '
 
 	git repo-config core.autocrlf false &&
 
-	for w in Hello world how are you; do echo $w; done >one &&
+	for w in Hello world how are you; do echo $w; done | d2u >one &&
 	mkdir dir &&
-	for w in I am very very fine thank you; do echo $w; done >dir/two &&
-	for w in Oh here is NULQin text here; do echo $w; done | q_to_nul >three &&
+	for w in I am very very fine thank you; do echo $w; done | d2u  >dir/two &&
+	for w in Oh here is NULQin text here; do echo $w; done | q_to_nul | d2u >three &&
 	git add . &&
 
 	git commit -m initial &&
@@ -34,7 +34,7 @@ test_expect_success setup '
 	two=`git rev-parse HEAD:dir/two` &&
 	three=`git rev-parse HEAD:three` &&
 
-	for w in Some extra lines here; do echo $w; done >>one &&
+	for w in Some extra lines here; do echo $w; done | d2u >>one &&
 	git diff >patch.file &&
 	patched=`git hash-object --stdin <one` &&
 	git read-tree --reset -u HEAD &&
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index a839f4e..9ca11bb 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -57,7 +57,7 @@ test_expect_success expanded_in_repo '
 		echo "\$Id:NoSpaceAtFront \$"
 		echo "\$Id:NoSpaceAtEitherEnd\$"
 		echo "\$Id: NoTerminatingSymbol"
-	} > expanded-keywords &&
+	} | d2u > expanded-keywords &&
 
 	{
 		echo "File with expanded keywords"
@@ -68,7 +68,7 @@ test_expect_success expanded_in_repo '
 		echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
 		echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
 		echo "\$Id: NoTerminatingSymbol"
-	} > expected-output &&
+	} | d2u > expected-output &&
 
 	git add expanded-keywords &&
 	git commit -m "File with keywords expanded" &&
-- 
1.5.1.2

  reply	other threads:[~2007-08-07 22:53 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07  9:02 git on Cygwin: Not a valid object name HEAD Sebastian Schuberth
2007-08-07 11:58 ` Johannes Schindelin
2007-08-07 12:13   ` Sebastian Schuberth
2007-08-07 13:18     ` Sebastian Schuberth
2007-08-07 14:36       ` Shawn O. Pearce
2007-08-07 14:58         ` Brian Downing
2007-08-07 15:27           ` Sebastian Schuberth
2007-08-07 17:11           ` Steffen Prohaska
2007-08-07 17:42             ` Mark Levedahl
2007-08-07 19:41               ` Steffen Prohaska
2007-08-07 21:44                 ` Linus Torvalds
2007-08-07 22:28                   ` Junio C Hamano
2007-08-08  3:47                     ` Linus Torvalds
2007-08-07 22:46                   ` Steffen Prohaska
2007-08-07 22:49                     ` [PATCH] cygwin: added fopen "b" and open O_BINARY to support cygwin's textmode Steffen Prohaska
2007-08-07 22:49                       ` Steffen Prohaska [this message]
2007-08-08  3:03                         ` [PATCH] tests: added d2u to have unix style testfiles even in textmode Linus Torvalds
2007-08-08  5:00                           ` Steffen Prohaska
2007-08-07 23:20                     ` git on Cygwin: Not a valid object name HEAD Steffen Prohaska
2007-08-08  4:25                     ` Brian Downing
2007-08-08  5:46                       ` Steffen Prohaska
2007-08-07 22:26                 ` Junio C Hamano
2007-08-08  7:55                   ` Sebastian Schuberth
2007-08-08 13:50                 ` Mark Levedahl
2007-08-08 15:51                   ` Steffen Prohaska
2007-08-08 16:41                     ` Mark Levedahl
2007-08-08 17:20                       ` Johannes Schindelin
2007-08-08 19:37                         ` Steffen Prohaska
2007-08-08 20:13                           ` Steffen Prohaska
2007-08-08 20:36                             ` Steffen Prohaska
2007-08-08 23:07                               ` Mark Levedahl
2007-08-09  4:59                                 ` Steffen Prohaska
2007-08-09  6:01                               ` Marius Storm-Olsen
2007-08-09  6:38                                 ` Steffen Prohaska
2007-08-09  6:47                                   ` Marius Storm-Olsen
2007-08-09  8:50                                 ` Johannes Schindelin
2007-08-09  9:00                                   ` Marius Storm-Olsen
2007-08-09 10:33                                     ` Steffen Prohaska
2007-08-08 21:30                           ` Johannes Schindelin
2007-08-09  6:20                             ` Steffen Prohaska
2007-08-10  6:07                               ` Torgil Svensson
2007-08-10  7:19                                 ` Steffen Prohaska
2007-08-10 10:30                                   ` Johannes Schindelin
2007-08-10 11:14                                     ` Steffen Prohaska
2007-08-10 22:31                                   ` Torgil Svensson
2007-08-11  0:43                                     ` Steffen Prohaska
2007-08-13 10:50                                       ` Johannes Schindelin
2007-08-15  0:04                                       ` Torgil Svensson
2007-08-15  5:22                                         ` Steffen Prohaska
2007-08-15  5:30                                           ` David Kastrup
2007-08-15  5:43                                             ` Steffen Prohaska
2007-08-15  6:59                                               ` David Kastrup
     [not found]                                               ` <86k5rx474o.fsf@lola.quinscape.zz>
2007-08-15  7:38                                                 ` Shawn O. Pearce
2007-08-15 12:42                                                   ` Mark Levedahl
2007-08-15 12:48                                                     ` Mark Levedahl
2007-08-15 13:06                                                       ` Steffen Prohaska
2007-08-16  0:27                                                         ` Mark Levedahl
2007-08-16  6:04                                                           ` Steffen Prohaska
2007-08-16 11:55                                                             ` Mark Levedahl
2007-08-07 15:29       ` Mark Levedahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11865269472121-git-send-email-prohaska@zib.de \
    --to=prohaska@zib.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).