From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>,
Sverre Rabbelier <srabbelier@gmail.com>,
David Barr <david.barr@cordelta.com>, Sam Vilain <sam@vilain.net>
Subject: [PATCH 08/24] t9300 (fast-import), series A: re-indent
Date: Fri, 24 Sep 2010 02:16:31 -0500 [thread overview]
Message-ID: <20100924071631.GI4666@burratino> (raw)
In-Reply-To: <20100924065900.GA4666@burratino>
This was originally an old-fashioned test script, with formatting
that might now look unfamiliar:
test_expect_success \
'series A: foo bar baz' \
'test commands &&
more test commands'
The apostrophes after tab make indenting more trouble than it ought to
be and the alignment cannot be preserved with the <<- operator
working. The initial and final apostrophes on command lines makes
patches that add new lines to a test harder to read. The title
aligned with the test code makes the test description harder to
take in at a glance.
So switch to the usual modern style:
test_expect_success 'series A: foo bar baz' '
test commands &&
more test commands
'
No other change intended.
Cc: Shawn O. Pearce <spearce@spearce.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
t/t9300-fast-import.sh | 99 ++++++++++++++++++++++++-----------------------
1 files changed, 51 insertions(+), 48 deletions(-)
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 0059298..10dc720 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -81,13 +81,12 @@ An annotated tag without a tagger
EOF
INPUT_END
-test_expect_success \
- 'A: create pack from stdin' \
- 'git fast-import --export-marks=marks.out <input &&
- git whatchanged master'
-test_expect_success \
- 'A: verify pack' \
- 'verify_packs'
+test_expect_success 'A: create pack from stdin' '
+ git fast-import --export-marks=marks.out <input &&
+ git whatchanged master'
+test_expect_success 'A: verify pack' '
+ verify_packs
+'
cat >expect <<EOF
author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -95,37 +94,40 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
initial
EOF
-test_expect_success \
- 'A: verify commit' \
- 'git cat-file commit master >commit &&
+test_expect_success 'A: verify commit' '
+ git cat-file commit master >commit &&
sed 1d <commit >actual &&
- test_cmp expect actual'
+ test_cmp expect actual
+'
cat >expect <<EOF
100644 blob file2
100644 blob file3
100755 blob file4
EOF
-test_expect_success \
- 'A: verify tree' \
- 'git cat-file -p master^{tree} >tree &&
- sed "s/ [0-9a-f]* / /" <tree >actual &&
- test_cmp expect actual'
+test_expect_success 'A: verify tree' '
+ git cat-file -p master^{tree} >tree &&
+ sed "s/ [0-9a-f]* / /" <tree >actual &&
+ test_cmp expect actual
+'
echo "$file2_data" >expect
-test_expect_success \
- 'A: verify file2' \
- 'git cat-file blob master:file2 >actual && test_cmp expect actual'
+test_expect_success 'A: verify file2' '
+ git cat-file blob master:file2 >actual &&
+ test_cmp expect actual
+'
echo "$file3_data" >expect
-test_expect_success \
- 'A: verify file3' \
- 'git cat-file blob master:file3 >actual && test_cmp expect actual'
+test_expect_success 'A: verify file3' '
+ git cat-file blob master:file3 >actual &&
+ test_cmp expect actual
+'
printf "$file4_data" >expect
-test_expect_success \
- 'A: verify file4' \
- 'git cat-file blob master:file4 >actual && test_cmp expect actual'
+test_expect_success 'A: verify file4' '
+ git cat-file blob master:file4 >actual &&
+ test_cmp expect actual
+'
test_expect_success 'A: verify tag/series-A' '
master=$(git rev-parse --verify refs/heads/master) &&
@@ -153,17 +155,17 @@ test_expect_success 'setup: compute expected marks' '
} >expect
'
-test_expect_success \
- 'A: verify marks output' \
- 'test_cmp expect marks.out'
+test_expect_success 'A: verify marks output' '
+ test_cmp expect marks.out
+'
-test_expect_success \
- 'A: verify marks import' \
- 'git fast-import \
+test_expect_success 'A: verify marks import' '
+ git fast-import \
--import-marks=marks.out \
--export-marks=marks.new \
</dev/null &&
- test_cmp expect marks.new'
+ test_cmp expect marks.new
+'
test_tick
cat >input <<INPUT_END
@@ -177,21 +179,21 @@ from :5
M 755 :2 copy-of-file2
INPUT_END
-test_expect_success \
- 'A: verify marks import does not crash' \
- 'git fast-import --import-marks=marks.out <input &&
- git whatchanged verify--import-marks'
-test_expect_success \
- 'A: verify pack' \
- 'verify_packs'
-test_expect_success \
- 'A: verify diff' \
- 'echo ":000000 100755 $zeroes $file2_id A copy-of-file2" >expect &&
- echo $file2_id >expect.copy &&
- git diff-tree -M -r master verify--import-marks >actual &&
- git rev-parse --verify verify--import-marks:copy-of-file2 >actual.copy &&
- compare_diff_raw expect actual &&
- test_cmp expect.copy actual.copy'
+test_expect_success 'A: verify marks import does not crash' '
+ git fast-import --import-marks=marks.out <input &&
+ git whatchanged verify--import-marks
+'
+test_expect_success 'A: verify pack' '
+ verify_packs
+'
+test_expect_success 'A: verify diff' '
+ echo ":000000 100755 $zeroes $file2_id A copy-of-file2" >expect &&
+ echo $file2_id >expect.copy &&
+ git diff-tree -M -r master verify--import-marks >actual &&
+ git rev-parse --verify verify--import-marks:copy-of-file2 >actual.copy &&
+ compare_diff_raw expect actual &&
+ test_cmp expect.copy actual.copy
+'
test_expect_success 'A: export marks with large values' '
test_tick &&
@@ -252,7 +254,8 @@ test_expect_success 'A: export marks with large values' '
cat input.blob input.commit | git fast-import --export-marks=marks.large &&
git ls-tree refs/heads/verify--dump-marks >tree.out &&
test_cmp tree.exp_s tree.out &&
- test_cmp marks.exp marks.large'
+ test_cmp marks.exp marks.large
+'
###
### series B
--
1.7.2.3
next prev parent reply other threads:[~2010-09-24 7:19 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 3:18 [PATCH/RFC] Teach fast-import to import subtrees named by tree id Jonathan Nieder
2010-07-01 5:48 ` [WIP/PATCH] Teach fast-import to print the id of each imported commit Jonathan Nieder
2010-07-02 3:16 ` Sverre Rabbelier
2010-07-02 3:41 ` Jonathan Nieder
2010-07-02 4:29 ` Sverre Rabbelier
2010-07-02 5:12 ` Jonathan Nieder
2010-07-02 14:55 ` Sverre Rabbelier
2010-07-02 15:40 ` Jonathan Nieder
2010-07-02 15:48 ` Sverre Rabbelier
2010-07-04 0:02 ` Sam Vilain
2010-07-04 0:35 ` Jonathan Nieder
2010-07-04 3:44 ` Sam Vilain
2010-07-04 7:22 ` Jonathan Nieder
2010-08-17 17:02 ` Ramkumar Ramachandra
2010-09-05 3:15 ` [RFC/PATCH 0/3] fast-import: give importers access to the object store Jonathan Nieder
2010-09-05 3:22 ` [PATCH 1/3] t9300 (fast-import): style tweaks Jonathan Nieder
2010-09-24 6:59 ` [PATCH/RFC 00/24] " Jonathan Nieder
2010-09-24 7:04 ` [PATCH 01/24] t9300 (fast-import): avoid exiting early on failure Jonathan Nieder
2010-09-24 7:05 ` [PATCH 02/24] t9300 (fast-import): avoid hard-coded object names Jonathan Nieder
2010-09-24 7:09 ` [PATCH 03/24] t9300 (fast-import): guard "export large marks" test setup Jonathan Nieder
2010-09-24 9:38 ` Ramkumar Ramachandra
2010-09-24 10:56 ` Raja R Harinath
2010-09-24 10:34 ` Ramkumar Ramachandra
2010-09-24 11:01 ` Raja R Harinath
2010-09-24 7:11 ` [PATCH 04/24] t9300 (fast-import): check exit status from upstream of pipes Jonathan Nieder
2010-09-24 7:11 ` [PATCH 05/24] t9300 (fast-import): check exit status from command substitutions Jonathan Nieder
2010-09-24 7:12 ` [PATCH 06/24] t9300 (fast-import): use test_cmp in place of test $(foo) = $(bar) Jonathan Nieder
2010-09-24 7:13 ` [PATCH 07/24] t9300 (fast-import): use tabs to indent Jonathan Nieder
2010-09-24 8:54 ` Ramkumar Ramachandra
2010-09-24 9:21 ` Jonathan Nieder
2010-09-24 7:16 ` Jonathan Nieder [this message]
2010-09-24 7:22 ` [PATCH 08/24] t9300 (fast-import), series A: re-indent Sverre Rabbelier
2010-09-24 7:35 ` Jonathan Nieder
2010-09-24 7:18 ` [PATCH 09/24] t9300 (fast-import), series B: re-indent Jonathan Nieder
2010-09-24 7:19 ` [PATCH 10/24] t9300 (fast-import), series C: re-indent Jonathan Nieder
2010-09-24 7:19 ` [PATCH 11/24] t9300 (fast-import), series D: re-indent Jonathan Nieder
2010-09-24 7:21 ` [PATCH 12/24] t9300 (fast-import), series E: re-indent Jonathan Nieder
2010-09-24 7:22 ` [PATCH 13/24] t9300 (fast-import), series F: re-indent Jonathan Nieder
2010-09-24 7:22 ` [PATCH 14/24] t9300 (fast-import), series H: re-indent Jonathan Nieder
2010-09-24 7:23 ` [PATCH 15/24] t9300 (fast-import), series I: re-indent Jonathan Nieder
2010-09-24 7:24 ` [PATCH 16/24] t9300 (fast-import), series J: re-indent Jonathan Nieder
2010-09-24 7:25 ` [PATCH 17/24] t9300 (fast-import), series K: re-indent Jonathan Nieder
2010-09-24 7:25 ` [PATCH 18/24] t9300 (fast-import), series L: re-indent Jonathan Nieder
2010-09-24 7:26 ` [PATCH 19/24] t9300 (fast-import), series M: re-indent Jonathan Nieder
2010-09-24 7:26 ` [PATCH 20/24] t9300 (fast-import), series N: re-indent Jonathan Nieder
2010-09-24 7:27 ` [PATCH 21/24] t9300 (fast-import), series O: re-indent Jonathan Nieder
2010-09-24 7:27 ` [PATCH 22/24] t9300 (fast-import), series P: re-indent Jonathan Nieder
2010-09-24 7:28 ` [PATCH 23/24] t9300 (fast-import), series Q: re-indent Jonathan Nieder
2010-09-24 7:30 ` [PATCH 24/24] t9300 (fast-import), series R: re-indent Jonathan Nieder
2010-09-25 5:19 ` svn-fe status Jonathan Nieder
2010-09-25 10:25 ` Sverre Rabbelier
2010-09-27 2:54 ` Jonathan Nieder
2010-09-27 9:15 ` Sverre Rabbelier
2010-09-05 3:29 ` [PATCH 2/3] Teach fast-import to print the id of each imported commit Jonathan Nieder
2010-09-05 3:41 ` [PATCH 3/3] fast-import: Let importers retrieve the objects being written Jonathan Nieder
2010-09-05 6:08 ` [RFC/PATCH 0/3] fast-import: give importers access to the object store Ramkumar Ramachandra
2010-09-05 6:28 ` Sverre Rabbelier
2010-09-05 8:47 ` Ramkumar Ramachandra
2010-09-05 16:20 ` Sverre Rabbelier
2010-09-05 17:31 ` Jonathan Nieder
2010-09-08 3:13 ` [PATCH 4/3] fast-import: typofix Jonathan Nieder
2010-09-08 3:17 ` [PATCH 5/3] fast-import: allow cat command with empty path Jonathan Nieder
2010-09-08 3:27 ` [PATCH 6/3] fast-import: Allow cat requests at arbitrary points in stream Jonathan Nieder
2010-09-08 3:38 ` Sverre Rabbelier
2010-09-08 3:57 ` Jonathan Nieder
2010-09-08 10:16 ` Ramkumar Ramachandra
2010-09-16 0:14 ` [RFC/PATCH 0/3] fast-import: give importers access to the object store Sam Vilain
2010-09-17 23:24 ` Sverre Rabbelier
2010-09-24 19:43 ` Jonathan Nieder
2010-09-24 23:44 ` Sverre Rabbelier
2010-09-25 0:01 ` Jonathan Nieder
2010-09-25 0:17 ` Sverre Rabbelier
2010-07-02 3:20 ` [PATCH/RFC] Teach fast-import to import subtrees named by tree id Sverre Rabbelier
2010-07-02 4:42 ` Jonathan Nieder
2010-07-02 12:44 ` Ramkumar Ramachandra
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=20100924071631.GI4666@burratino \
--to=jrnieder@gmail.com \
--cc=artagnon@gmail.com \
--cc=david.barr@cordelta.com \
--cc=git@vger.kernel.org \
--cc=sam@vilain.net \
--cc=spearce@spearce.org \
--cc=srabbelier@gmail.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.
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).