aboutsummaryrefslogtreecommitdiff
path: root/t/t1003-read-tree-prefix.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-03 14:41:29 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-03 14:41:29 -0700
commitc43ce6d603c68f716f83f1da68cc4692202085e0 (patch)
treeb2f9173636336376bbdad8a7a5fb013f56db70f4 /t/t1003-read-tree-prefix.sh
parenta91af794bb4349e0b35d6a9615db31ae2f6ee355 (diff)
downloadgit-c43ce6d603c68f716f83f1da68cc4692202085e0.tar.gz
git-c43ce6d603c68f716f83f1da68cc4692202085e0.tar.xz
Add a couple of subdirectory tests.
We still have too few of them, but we have to start from somewhere. The general rule is to make tests easy to debug when run with -v (notice use of seemingly useless echo everywhere in the new tests). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t1003-read-tree-prefix.sh')
-rwxr-xr-xt/t1003-read-tree-prefix.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh
new file mode 100755
index 000000000..48ab117d7
--- /dev/null
+++ b/t/t1003-read-tree-prefix.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Junio C Hamano
+#
+
+test_description='git-read-tree --prefix test.
+'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ echo hello >one &&
+ git-update-index --add one &&
+ tree=`git-write-tree` &&
+ echo tree is $tree
+'
+
+echo 'one
+two/one' >expect
+
+test_expect_success 'read-tree --prefix' '
+ git-read-tree --prefix=two/ $tree &&
+ git-ls-files >actual &&
+ cmp expect actual
+'
+
+test_done