summaryrefslogtreecommitdiffstats
path: root/t/t4150-am.sh
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2008-06-01 00:11:43 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-31 15:42:12 -0700
commit8ec00d0534c28763ed07533920daa47baca0d6a6 (patch)
tree61b65d489cf912297a6ca245eb219eb073226812 /t/t4150-am.sh
parentAdd test cases for git-am (diff)
downloadgit-8ec00d0534c28763ed07533920daa47baca0d6a6.tar.gz
git-8ec00d0534c28763ed07533920daa47baca0d6a6.zip
Merge t4150-am-subdir.sh and t4151-am.sh into t4150-am.sh
This patch moves the am test cases in t4150-am.sh and the am subdirectory test cases from t/t4150-am-subdir.sh into t/4151-am.sh. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-xt/t4150-am.sh (renamed from t/t4151-am.sh)34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/t4151-am.sh b/t/t4150-am.sh
index ec1b4423c6..722ae96cd5 100755
--- a/t/t4151-am.sh
+++ b/t/t4150-am.sh
@@ -223,4 +223,38 @@ test_expect_success 'am fails on empty patch' '
! test -d .dotest
'
+test_expect_success 'am works from stdin in subdirectory' '
+ rm -fr subdir &&
+ git checkout first &&
+ (
+ mkdir -p subdir &&
+ cd subdir &&
+ git am <../patch1
+ ) &&
+ test -z "$(git diff second)"
+'
+
+test_expect_success 'am works from file (relative path given) in subdirectory' '
+ rm -fr subdir &&
+ git checkout first &&
+ (
+ mkdir -p subdir &&
+ cd subdir &&
+ git am ../patch1
+ ) &&
+ test -z "$(git diff second)"
+'
+
+test_expect_success 'am works from file (absolute path given) in subdirectory' '
+ rm -fr subdir &&
+ git checkout first &&
+ P=$(pwd) &&
+ (
+ mkdir -p subdir &&
+ cd subdir &&
+ git am "$P/patch1"
+ ) &&
+ test -z "$(git diff second)"
+'
+
test_done