git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
Date: Wed, 13 Feb 2008 04:11:22 +0100	[thread overview]
Message-ID: <200802130411.22093.johan@herland.net> (raw)
In-Reply-To: <200802122141.35594.robin.rosenberg.lists@dewire.com>

The testcase verifies that 'git cvsexportcommit' functions correctly when
the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.').

Signed-off-by: Johan Herland <johan@herland.net>
---

On Tuesday 12 February 2008, Robin Rosenberg wrote:
> Looks ok. Something for the test suite?

Like this?


Have fun! :)

...Johan


 t/t9200-git-cvsexportcommit.sh |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index a15222c..5dae88c 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -2,7 +2,7 @@
 #
 # Copyright (c) Robin Rosenberg
 #
-test_description='CVS export comit. '
+test_description='Test export of commits to CVS'
 
 . ./test-lib.sh
 
@@ -246,4 +246,20 @@ test_expect_success \
 	;;
 esac
 
+test_expect_success \
+     '-w option should work with relative GIT_DIR' \
+     'mkdir W &&
+      echo foobar >W/file1.txt &&
+      echo bazzle >W/file2.txt &&
+      git add W/file1.txt &&
+      git add W/file2.txt &&
+      git commit -m "More updates" &&
+      id=$(git rev-list --max-count=1 HEAD) &&
+      (cd "$GIT_DIR" &&
+      GIT_DIR=. git cvsexportcommit -w "$CVSWORK" -c $id &&
+      check_entries "$CVSWORK/W" "file1.txt/1.1/|file2.txt/1.1/" &&
+      diff -u "$CVSWORK/W/file1.txt" ../W/file1.txt &&
+      diff -u "$CVSWORK/W/file2.txt" ../W/file2.txt
+      )'
+
 test_done
-- 
1.5.4.2.g41ac4

  reply	other threads:[~2008-02-13  3:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11  1:28 [PATCH] Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR Johan Herland
2008-02-11 20:10 ` Junio C Hamano
2008-02-11 20:58 ` Robin Rosenberg
2008-02-11 23:43   ` Johan Herland
2008-02-12 20:41     ` Robin Rosenberg
2008-02-13  3:11       ` Johan Herland [this message]
2008-02-13  7:58         ` [PATCH] Add testcase for 'git cvsexportcommit -w $cvsdir ...' " Junio C Hamano
2008-02-13  9:26           ` Jakub Narebski

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

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

  git send-email \
    --in-reply-to=200802130411.22093.johan@herland.net \
    --to=johan@herland.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=robin.rosenberg.lists@dewire.com \
    /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.
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 NNTP newsgroup(s).