[PATCH 06/12] tests: remove "trash" directory

John Keeping john at keeping.me.uk
Mon Apr 8 21:12:35 CEST 2013


Now that we're using Git's test framework, it generates a suitable trash
directory for us to use, so we don't need to create a "trash"
subdirectory.

This patch was generated with "sed -i -e 's!trash/!!g' tests/*.sh" with
the t0107-snapshot.sh tests fixed to avoid passing "-C trash" to tar or
"-d trash" to unzip.

Signed-off-by: John Keeping <john at keeping.me.uk>
---
 tests/setup.sh                | 28 ++++++++++++++--------------
 tests/t0010-validate-html.sh  |  6 +++---
 tests/t0020-validate-cache.sh | 18 +++++++++---------
 tests/t0101-index.sh          | 20 ++++++++++----------
 tests/t0102-summary.sh        | 26 +++++++++++++-------------
 tests/t0103-log.sh            | 26 +++++++++++++-------------
 tests/t0104-tree.sh           | 20 ++++++++++----------
 tests/t0105-commit.sh         | 26 +++++++++++++-------------
 tests/t0106-diff.sh           | 12 ++++++------
 tests/t0107-snapshot.sh       | 40 ++++++++++++++++++++--------------------
 tests/t0108-patch.sh          | 16 ++++++++--------
 11 files changed, 119 insertions(+), 119 deletions(-)

diff --git a/tests/setup.sh b/tests/setup.sh
index 962d96b..f4bdafd 100755
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -48,15 +48,15 @@ mkrepo() {
 
 setup_repos()
 {
-	rm -rf trash/cache
-	mkdir -p trash/cache
-	mkrepo trash/repos/foo 5 >/dev/null
-	mkrepo trash/repos/bar 50 >/dev/null
-	mkrepo trash/repos/foo+bar 10 testplus >/dev/null
-	mkrepo "trash/repos/with space" 2 >/dev/null
-	cat >trash/cgitrc <<EOF
+	rm -rf cache
+	mkdir -p cache
+	mkrepo repos/foo 5 >/dev/null
+	mkrepo repos/bar 50 >/dev/null
+	mkrepo repos/foo+bar 10 testplus >/dev/null
+	mkrepo "repos/with space" 2 >/dev/null
+	cat >cgitrc <<EOF
 virtual-root=/
-cache-root=$PWD/trash/cache
+cache-root=$PWD/cache
 
 cache-size=1021
 snapshots=tar.gz tar.bz zip
@@ -68,33 +68,33 @@ summary-tags=5
 clone-url=git://example.org/\$CGIT_REPO_URL.git
 
 repo.url=foo
-repo.path=$PWD/trash/repos/foo/.git
+repo.path=$PWD/repos/foo/.git
 # Do not specify a description for this repo, as it then will be assigned
 # the constant value "[no description]" (which actually used to cause a
 # segfault).
 
 repo.url=bar
-repo.path=$PWD/trash/repos/bar/.git
+repo.path=$PWD/repos/bar/.git
 repo.desc=the bar repo
 
 repo.url=foo+bar
-repo.path=$PWD/trash/repos/foo+bar/.git
+repo.path=$PWD/repos/foo+bar/.git
 repo.desc=the foo+bar repo
 
 repo.url=with space
-repo.path=$PWD/trash/repos/with space/.git
+repo.path=$PWD/repos/with space/.git
 repo.desc=spaced repo
 EOF
 }
 
 cgit_query()
 {
-	CGIT_CONFIG="$PWD/trash/cgitrc" QUERY_STRING="$1" "$PWD/../../cgit"
+	CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="$1" "$PWD/../../cgit"
 }
 
 cgit_url()
 {
-	CGIT_CONFIG="$PWD/trash/cgitrc" QUERY_STRING="url=$1" "$PWD/../../cgit"
+	CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="url=$1" "$PWD/../../cgit"
 }
 
 test -z "$CGIT_TEST_NO_CREATE_REPOS" && setup_repos
diff --git a/tests/t0010-validate-html.sh b/tests/t0010-validate-html.sh
index 36d2ab6..d4b50ad 100755
--- a/tests/t0010-validate-html.sh
+++ b/tests/t0010-validate-html.sh
@@ -8,9 +8,9 @@ test_url()
 {
 	tidy_opt="-eq"
 	test -z "$NO_TIDY_WARNINGS" || tidy_opt+=" --show-warnings no"
-	cgit_url "$1" >trash/tidy-$test_count || return
-	sed -ie "1,4d" trash/tidy-$test_count || return
-	"$tidy" $tidy_opt trash/tidy-$test_count
+	cgit_url "$1" >tidy-$test_count || return
+	sed -ie "1,4d" tidy-$test_count || return
+	"$tidy" $tidy_opt tidy-$test_count
 	rc=$?
 
 	# tidy returns with exitcode 1 on warnings, 2 on error
diff --git a/tests/t0020-validate-cache.sh b/tests/t0020-validate-cache.sh
index b6a12c7..135b24d 100755
--- a/tests/t0020-validate-cache.sh
+++ b/tests/t0020-validate-cache.sh
@@ -5,8 +5,8 @@ test_description='Validate cache'
 
 test_expect_success 'verify cache-size=0' '
 
-	rm -f trash/cache/* &&
-	sed -i -e "s/cache-size=1021$/cache-size=0/" trash/cgitrc &&
+	rm -f cache/* &&
+	sed -i -e "s/cache-size=1021$/cache-size=0/" cgitrc &&
 	cgit_url "" &&
 	cgit_url "foo" &&
 	cgit_url "foo/refs" &&
@@ -20,13 +20,13 @@ test_expect_success 'verify cache-size=0' '
 	cgit_url "bar/log" &&
 	cgit_url "bar/diff" &&
 	cgit_url "bar/patch" &&
-	test 0 -eq $(ls trash/cache | wc -l)
+	test 0 -eq $(ls cache | wc -l)
 '
 
 test_expect_success 'verify cache-size=1' '
 
-	rm -f trash/cache/* &&
-	sed -i -e "s/cache-size=0$/cache-size=1/" trash/cgitrc &&
+	rm -f cache/* &&
+	sed -i -e "s/cache-size=0$/cache-size=1/" cgitrc &&
 	cgit_url "" &&
 	cgit_url "foo" &&
 	cgit_url "foo/refs" &&
@@ -40,13 +40,13 @@ test_expect_success 'verify cache-size=1' '
 	cgit_url "bar/log" &&
 	cgit_url "bar/diff" &&
 	cgit_url "bar/patch" &&
-	test 1 -eq $(ls trash/cache | wc -l)
+	test 1 -eq $(ls cache | wc -l)
 '
 
 test_expect_success 'verify cache-size=1021' '
 
-	rm -f trash/cache/* &&
-	sed -i -e "s/cache-size=1$/cache-size=1021/" trash/cgitrc &&
+	rm -f cache/* &&
+	sed -i -e "s/cache-size=1$/cache-size=1021/" cgitrc &&
 	cgit_url "" &&
 	cgit_url "foo" &&
 	cgit_url "foo/refs" &&
@@ -60,7 +60,7 @@ test_expect_success 'verify cache-size=1021' '
 	cgit_url "bar/log" &&
 	cgit_url "bar/diff" &&
 	cgit_url "bar/patch" &&
-	test 13 -eq $(ls trash/cache | wc -l)
+	test 13 -eq $(ls cache | wc -l)
 '
 
 test_done
diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh
index 69c92d1..82ef9b0 100755
--- a/tests/t0101-index.sh
+++ b/tests/t0101-index.sh
@@ -3,15 +3,15 @@
 test_description='Check content on index page'
 . ./setup.sh
 
-test_expect_success 'generate index page' 'cgit_url "" >trash/tmp'
-test_expect_success 'find foo repo' 'grep "foo" trash/tmp'
-test_expect_success 'find foo description' 'grep "\[no description\]" trash/tmp'
-test_expect_success 'find bar repo' 'grep "bar" trash/tmp'
-test_expect_success 'find bar description' 'grep "the bar repo" trash/tmp'
-test_expect_success 'find foo+bar repo' 'grep ">foo+bar<" trash/tmp'
-test_expect_success 'verify foo+bar link' 'grep "/foo+bar/" trash/tmp'
-test_expect_success 'verify "with%20space" link' 'grep "/with%20space/" trash/tmp'
-test_expect_success 'no tree-link' '! grep "foo/tree" trash/tmp'
-test_expect_success 'no log-link' '! grep "foo/log" trash/tmp'
+test_expect_success 'generate index page' 'cgit_url "" >tmp'
+test_expect_success 'find foo repo' 'grep "foo" tmp'
+test_expect_success 'find foo description' 'grep "\[no description\]" tmp'
+test_expect_success 'find bar repo' 'grep "bar" tmp'
+test_expect_success 'find bar description' 'grep "the bar repo" tmp'
+test_expect_success 'find foo+bar repo' 'grep ">foo+bar<" tmp'
+test_expect_success 'verify foo+bar link' 'grep "/foo+bar/" tmp'
+test_expect_success 'verify "with%20space" link' 'grep "/with%20space/" tmp'
+test_expect_success 'no tree-link' '! grep "foo/tree" tmp'
+test_expect_success 'no log-link' '! grep "foo/log" tmp'
 
 test_done
diff --git a/tests/t0102-summary.sh b/tests/t0102-summary.sh
index 470f89e..b8864cb 100755
--- a/tests/t0102-summary.sh
+++ b/tests/t0102-summary.sh
@@ -3,23 +3,23 @@
 test_description='Check content on summary page'
 . ./setup.sh
 
-test_expect_success 'generate foo summary' 'cgit_url "foo" >trash/tmp'
-test_expect_success 'find commit 1' 'grep "commit 1" trash/tmp'
-test_expect_success 'find commit 5' 'grep "commit 5" trash/tmp'
-test_expect_success 'find branch master' 'grep "master" trash/tmp'
-test_expect_success 'no tags' '! grep "tags" trash/tmp'
+test_expect_success 'generate foo summary' 'cgit_url "foo" >tmp'
+test_expect_success 'find commit 1' 'grep "commit 1" tmp'
+test_expect_success 'find commit 5' 'grep "commit 5" tmp'
+test_expect_success 'find branch master' 'grep "master" tmp'
+test_expect_success 'no tags' '! grep "tags" tmp'
 test_expect_success 'clone-url expanded correctly' '
-	grep "git://example.org/foo.git" trash/tmp
+	grep "git://example.org/foo.git" tmp
 '
 
-test_expect_success 'generate bar summary' 'cgit_url "bar" >trash/tmp'
-test_expect_success 'no commit 45' '! grep "commit 45" trash/tmp'
-test_expect_success 'find commit 46' 'grep "commit 46" trash/tmp'
-test_expect_success 'find commit 50' 'grep "commit 50" trash/tmp'
-test_expect_success 'find branch master' 'grep "master" trash/tmp'
-test_expect_success 'no tags' '! grep "tags" trash/tmp'
+test_expect_success 'generate bar summary' 'cgit_url "bar" >tmp'
+test_expect_success 'no commit 45' '! grep "commit 45" tmp'
+test_expect_success 'find commit 46' 'grep "commit 46" tmp'
+test_expect_success 'find commit 50' 'grep "commit 50" tmp'
+test_expect_success 'find branch master' 'grep "master" tmp'
+test_expect_success 'no tags' '! grep "tags" tmp'
 test_expect_success 'clone-url expanded correctly' '
-	grep "git://example.org/bar.git" trash/tmp
+	grep "git://example.org/bar.git" tmp
 '
 
 test_done
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh
index ec873bc..bdf1435 100755
--- a/tests/t0103-log.sh
+++ b/tests/t0103-log.sh
@@ -3,22 +3,22 @@
 test_description='Check content on log page'
 . ./setup.sh
 
-test_expect_success 'generate foo/log' 'cgit_url "foo/log" >trash/tmp'
-test_expect_success 'find commit 1' 'grep "commit 1" trash/tmp'
-test_expect_success 'find commit 5' 'grep "commit 5" trash/tmp'
+test_expect_success 'generate foo/log' 'cgit_url "foo/log" >tmp'
+test_expect_success 'find commit 1' 'grep "commit 1" tmp'
+test_expect_success 'find commit 5' 'grep "commit 5" tmp'
 
-test_expect_success 'generate bar/log' 'cgit_url "bar/log" >trash/tmp'
-test_expect_success 'find commit 1' 'grep "commit 1" trash/tmp'
-test_expect_success 'find commit 50' 'grep "commit 50" trash/tmp'
+test_expect_success 'generate bar/log' 'cgit_url "bar/log" >tmp'
+test_expect_success 'find commit 1' 'grep "commit 1" tmp'
+test_expect_success 'find commit 50' 'grep "commit 50" tmp'
 
 test_expect_success 'generate "with%20space/log?qt=grep&q=commit+1"' '
-	cgit_url "with+space/log&qt=grep&q=commit+1" >trash/tmp
+	cgit_url "with+space/log&qt=grep&q=commit+1" >tmp
 '
-test_expect_success 'find commit 1' 'grep "commit 1" trash/tmp'
-test_expect_success 'find link with %20 in path' 'grep "/with%20space/log/?qt=grep" trash/tmp'
-test_expect_success 'find link with + in arg' 'grep "/log/?qt=grep&q=commit+1" trash/tmp'
-test_expect_success 'no links with space in path' '! grep "href=./with space/" trash/tmp'
-test_expect_success 'no links with space in arg' '! grep "q=commit 1" trash/tmp'
-test_expect_success 'commit 2 is not visible' '! grep "commit 2" trash/tmp'
+test_expect_success 'find commit 1' 'grep "commit 1" tmp'
+test_expect_success 'find link with %20 in path' 'grep "/with%20space/log/?qt=grep" tmp'
+test_expect_success 'find link with + in arg' 'grep "/log/?qt=grep&q=commit+1" tmp'
+test_expect_success 'no links with space in path' '! grep "href=./with space/" tmp'
+test_expect_success 'no links with space in arg' '! grep "q=commit 1" tmp'
+test_expect_success 'commit 2 is not visible' '! grep "commit 2" tmp'
 
 test_done
diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh
index ecf96e6..100b026 100755
--- a/tests/t0104-tree.sh
+++ b/tests/t0104-tree.sh
@@ -3,30 +3,30 @@
 test_description='Check content on tree page'
 . ./setup.sh
 
-test_expect_success 'generate bar/tree' 'cgit_url "bar/tree" >trash/tmp'
-test_expect_success 'find file-1' 'grep "file-1" trash/tmp'
-test_expect_success 'find file-50' 'grep "file-50" trash/tmp'
+test_expect_success 'generate bar/tree' 'cgit_url "bar/tree" >tmp'
+test_expect_success 'find file-1' 'grep "file-1" tmp'
+test_expect_success 'find file-50' 'grep "file-50" tmp'
 
-test_expect_success 'generate bar/tree/file-50' 'cgit_url "bar/tree/file-50" >trash/tmp'
+test_expect_success 'generate bar/tree/file-50' 'cgit_url "bar/tree/file-50" >tmp'
 
 test_expect_success 'find line 1' '
-	grep "<a class=.no. id=.n1. name=.n1. href=.#n1.>1</a>" trash/tmp
+	grep "<a class=.no. id=.n1. name=.n1. href=.#n1.>1</a>" tmp
 '
 
 test_expect_success 'no line 2' '
-	! grep "<a class=.no. id=.n2. name=.n2. href=.#n2.>2</a>" trash/tmp
+	! grep "<a class=.no. id=.n2. name=.n2. href=.#n2.>2</a>" tmp
 '
 
-test_expect_success 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >trash/tmp'
+test_expect_success 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >tmp'
 
 test_expect_success 'verify a+b link' '
-	grep "/foo+bar/tree/a+b" trash/tmp
+	grep "/foo+bar/tree/a+b" tmp
 '
 
-test_expect_success 'generate foo+bar/tree?h=1+2' 'cgit_url "foo%2bbar/tree&h=1%2b2" >trash/tmp'
+test_expect_success 'generate foo+bar/tree?h=1+2' 'cgit_url "foo%2bbar/tree&h=1%2b2" >tmp'
 
 test_expect_success 'verify a+b?h=1+2 link' '
-	grep "/foo+bar/tree/a+b?h=1%2b2" trash/tmp
+	grep "/foo+bar/tree/a+b?h=1%2b2" tmp
 '
 
 test_done
diff --git a/tests/t0105-commit.sh b/tests/t0105-commit.sh
index ae6bd94..9cdf55c 100755
--- a/tests/t0105-commit.sh
+++ b/tests/t0105-commit.sh
@@ -3,34 +3,34 @@
 test_description='Check content on commit page'
 . ./setup.sh
 
-test_expect_success 'generate foo/commit' 'cgit_url "foo/commit" >trash/tmp'
-test_expect_success 'find tree link' 'grep "<a href=./foo/tree/.>" trash/tmp'
-test_expect_success 'find parent link' 'grep -E "<a href=./foo/commit/\?id=.+>" trash/tmp'
+test_expect_success 'generate foo/commit' 'cgit_url "foo/commit" >tmp'
+test_expect_success 'find tree link' 'grep "<a href=./foo/tree/.>" tmp'
+test_expect_success 'find parent link' 'grep -E "<a href=./foo/commit/\?id=.+>" tmp'
 
 test_expect_success 'find commit subject' '
-	grep "<div class=.commit-subject.>commit 5<" trash/tmp
+	grep "<div class=.commit-subject.>commit 5<" tmp
 '
 
-test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" trash/tmp'
-test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" trash/tmp'
+test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" tmp'
+test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" tmp'
 
 test_expect_success 'find diff summary' '
-	grep "1 files changed, 1 insertions, 0 deletions" trash/tmp
+	grep "1 files changed, 1 insertions, 0 deletions" tmp
 '
 
 test_expect_success 'get root commit' '
-	root=$(cd trash/repos/foo && git rev-list --reverse HEAD | head -1) &&
-	cgit_url "foo/commit&id=$root" >trash/tmp &&
-	grep "</html>" trash/tmp
+	root=$(cd repos/foo && git rev-list --reverse HEAD | head -1) &&
+	cgit_url "foo/commit&id=$root" >tmp &&
+	grep "</html>" tmp
 '
 
 test_expect_success 'root commit contains diffstat' '
-	grep "<a href=./foo/diff/file-1.id=[0-9a-f]\{40\}.>file-1</a>" trash/tmp
+	grep "<a href=./foo/diff/file-1.id=[0-9a-f]\{40\}.>file-1</a>" tmp
 '
 
 test_expect_success 'root commit contains diff' '
-	grep ">diff --git a/file-1 b/file-1<" trash/tmp &&
-	grep "<div class=.add.>+1</div>" trash/tmp
+	grep ">diff --git a/file-1 b/file-1<" tmp &&
+	grep "<div class=.add.>+1</div>" tmp
 '
 
 test_done
diff --git a/tests/t0106-diff.sh b/tests/t0106-diff.sh
index 427ad29..82b645e 100755
--- a/tests/t0106-diff.sh
+++ b/tests/t0106-diff.sh
@@ -3,17 +3,17 @@
 test_description='Check content on diff page'
 . ./setup.sh
 
-test_expect_success 'generate foo/diff' 'cgit_url "foo/diff" >trash/tmp'
-test_expect_success 'find diff header' 'grep "a/file-5 b/file-5" trash/tmp'
-test_expect_success 'find blob link' 'grep "<a href=./foo/tree/file-5?id=" trash/tmp'
-test_expect_success 'find added file' 'grep "new file mode 100644" trash/tmp'
+test_expect_success 'generate foo/diff' 'cgit_url "foo/diff" >tmp'
+test_expect_success 'find diff header' 'grep "a/file-5 b/file-5" tmp'
+test_expect_success 'find blob link' 'grep "<a href=./foo/tree/file-5?id=" tmp'
+test_expect_success 'find added file' 'grep "new file mode 100644" tmp'
 
 test_expect_success 'find hunk header' '
-	grep "<div class=.hunk.>@@ -0,0 +1 @@</div>" trash/tmp
+	grep "<div class=.hunk.>@@ -0,0 +1 @@</div>" tmp
 '
 
 test_expect_success 'find added line' '
-	grep "<div class=.add.>+5</div>" trash/tmp
+	grep "<div class=.add.>+5</div>" tmp
 '
 
 test_done
diff --git a/tests/t0107-snapshot.sh b/tests/t0107-snapshot.sh
index 271cdb4..e244968 100755
--- a/tests/t0107-snapshot.sh
+++ b/tests/t0107-snapshot.sh
@@ -4,73 +4,73 @@ test_description='Verify snapshot'
 . ./setup.sh
 
 test_expect_success 'get foo/snapshot/master.tar.gz' '
-	cgit_url "foo/snapshot/master.tar.gz" >trash/tmp
+	cgit_url "foo/snapshot/master.tar.gz" >tmp
 '
 
 test_expect_success 'check html headers' '
-	head -n 1 trash/tmp |
+	head -n 1 tmp |
 	grep "Content-Type: application/x-gzip" &&
 
-	head -n 2 trash/tmp |
+	head -n 2 tmp |
 	grep "Content-Disposition: inline; filename=.master.tar.gz."
 '
 
 test_expect_success 'strip off the header lines' '
-	tail -n +6 trash/tmp > trash/master.tar.gz
+	tail -n +6 tmp > master.tar.gz
 '
 
 test_expect_success 'verify gzip format' '
-	gunzip --test trash/master.tar.gz
+	gunzip --test master.tar.gz
 '
 
 test_expect_success 'untar' '
-	rm -rf trash/master &&
-	tar -xf trash/master.tar.gz -C trash
+	rm -rf master &&
+	tar -xf master.tar.gz
 '
 
 test_expect_success 'count files' '
-	c=$(ls -1 trash/master/ | wc -l) &&
+	c=$(ls -1 master/ | wc -l) &&
 	test $c = 5
 '
 
 test_expect_success 'verify untarred file-5' '
-	grep "^5$" trash/master/file-5 &&
-	test $(cat trash/master/file-5 | wc -l) = 1
+	grep "^5$" master/file-5 &&
+	test $(cat master/file-5 | wc -l) = 1
 '
 
 test_expect_success 'get foo/snapshot/master.zip' '
-	cgit_url "foo/snapshot/master.zip" >trash/tmp
+	cgit_url "foo/snapshot/master.zip" >tmp
 '
 
 test_expect_success 'check HTML headers (zip)' '
-	head -n 1 trash/tmp |
+	head -n 1 tmp |
 	grep "Content-Type: application/x-zip" &&
 
-	head -n 2 trash/tmp |
+	head -n 2 tmp |
 	grep "Content-Disposition: inline; filename=.master.zip."
 '
 
 test_expect_success 'strip off the header lines (zip)' '
-	tail -n +6 trash/tmp >trash/master.zip
+	tail -n +6 tmp >master.zip
 '
 
 test_expect_success 'verify zip format' '
-	unzip -t trash/master.zip
+	unzip -t master.zip
 '
 
 test_expect_success 'unzip' '
-	rm -rf trash/master &&
-	unzip trash/master.zip -d trash
+	rm -rf master &&
+	unzip master.zip
 '
 
 test_expect_success 'count files (zip)' '
-	c=$(ls -1 trash/master/ | wc -l) &&
+	c=$(ls -1 master/ | wc -l) &&
 	test $c = 5
 '
 
 test_expect_success 'verify unzipped file-5' '
-	 grep "^5$" trash/master/file-5 &&
-	 test $(cat trash/master/file-5 | wc -l) = 1
+	 grep "^5$" master/file-5 &&
+	 test $(cat master/file-5 | wc -l) = 1
 '
 
 test_done
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh
index 8bf6914..3b5bae4 100755
--- a/tests/t0108-patch.sh
+++ b/tests/t0108-patch.sh
@@ -4,35 +4,35 @@ test_description='Check content on patch page'
 . ./setup.sh
 
 test_expect_success 'generate foo/patch' '
-	cgit_query "url=foo/patch" >trash/tmp
+	cgit_query "url=foo/patch" >tmp
 '
 
 test_expect_success 'find `From:` line' '
-	grep "^From: " trash/tmp
+	grep "^From: " tmp
 '
 
 test_expect_success 'find `Date:` line' '
-	grep "^Date: " trash/tmp
+	grep "^Date: " tmp
 '
 
 test_expect_success 'find `Subject:` line' '
-	grep "^Subject: commit 5" trash/tmp
+	grep "^Subject: commit 5" tmp
 '
 
 test_expect_success 'find `cgit` signature' '
-	tail -1 trash/tmp | grep "^cgit"
+	tail -1 tmp | grep "^cgit"
 '
 
 test_expect_success 'find initial commit' '
-	root=$(git --git-dir="$PWD/trash/repos/foo/.git" rev-list HEAD | tail -1)
+	root=$(git --git-dir="$PWD/repos/foo/.git" rev-list HEAD | tail -1)
 '
 
 test_expect_success 'generate patch for initial commit' '
-	cgit_query "url=foo/patch&id=$root" >trash/tmp
+	cgit_query "url=foo/patch&id=$root" >tmp
 '
 
 test_expect_success 'find `cgit` signature' '
-	tail -1 trash/tmp | grep "^cgit"
+	tail -1 tmp | grep "^cgit"
 '
 
 test_done
-- 
1.8.2.694.ga76e9c3.dirty





More information about the CGit mailing list