Skip to content

Commit 8ec00d0

Browse files
sbeyergitster
authored andcommitted
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>
1 parent d3a7b8f commit 8ec00d0

File tree

2 files changed

+34
-72
lines changed

2 files changed

+34
-72
lines changed

t/t4150-am-subdir.sh

Lines changed: 0 additions & 72 deletions
This file was deleted.

t/t4151-am.sh renamed to t/t4150-am.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,38 @@ test_expect_success 'am fails on empty patch' '
223223
! test -d .dotest
224224
'
225225

226+
test_expect_success 'am works from stdin in subdirectory' '
227+
rm -fr subdir &&
228+
git checkout first &&
229+
(
230+
mkdir -p subdir &&
231+
cd subdir &&
232+
git am <../patch1
233+
) &&
234+
test -z "$(git diff second)"
235+
'
236+
237+
test_expect_success 'am works from file (relative path given) in subdirectory' '
238+
rm -fr subdir &&
239+
git checkout first &&
240+
(
241+
mkdir -p subdir &&
242+
cd subdir &&
243+
git am ../patch1
244+
) &&
245+
test -z "$(git diff second)"
246+
'
247+
248+
test_expect_success 'am works from file (absolute path given) in subdirectory' '
249+
rm -fr subdir &&
250+
git checkout first &&
251+
P=$(pwd) &&
252+
(
253+
mkdir -p subdir &&
254+
cd subdir &&
255+
git am "$P/patch1"
256+
) &&
257+
test -z "$(git diff second)"
258+
'
259+
226260
test_done

0 commit comments

Comments
 (0)