@matheusbsbs / matheus-bagliano / commits / 8ec00d0534
Fork 0

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>

Stephan Beyer committed Jun 1, 2008 at 00:11 UTC 8ec00d0534c28763ed07533920daa47baca0d6a6
2 files changed +34 -72
t/t4150-am-subdir.sh deleted
-72
@@ -1,72 +0,0 @@
1 -#!/bin/sh
2 -
3 -test_description='git am running from a subdirectory'
4 -
5 -. ./test-lib.sh
6 -
7 -test_expect_success setup '
8 - echo hello >world &&
9 - git add world &&
10 - test_tick &&
11 - git commit -m initial &&
12 - git tag initial &&
13 - echo goodbye >world &&
14 - git add world &&
15 - test_tick &&
16 - git commit -m second &&
17 - git format-patch --stdout HEAD^ >patchfile &&
18 - : >expect
19 -'
20 -
21 -test_expect_success 'am regularly from stdin' '
22 - git checkout initial &&
23 - git am <patchfile &&
24 - git diff master >actual &&
25 - test_cmp expect actual
26 -'
27 -
28 -test_expect_success 'am regularly from file' '
29 - git checkout initial &&
30 - git am patchfile &&
31 - git diff master >actual &&
32 - test_cmp expect actual
33 -'
34 -
35 -test_expect_success 'am regularly from stdin in subdirectory' '
36 - rm -fr subdir &&
37 - git checkout initial &&
38 - (
39 - mkdir -p subdir &&
40 - cd subdir &&
41 - git am <../patchfile
42 - ) &&
43 - git diff master>actual &&
44 - test_cmp expect actual
45 -'
46 -
47 -test_expect_success 'am regularly from file in subdirectory' '
48 - rm -fr subdir &&
49 - git checkout initial &&
50 - (
51 - mkdir -p subdir &&
52 - cd subdir &&
53 - git am ../patchfile
54 - ) &&
55 - git diff master >actual &&
56 - test_cmp expect actual
57 -'
58 -
59 -test_expect_success 'am regularly from file in subdirectory with full path' '
60 - rm -fr subdir &&
61 - git checkout initial &&
62 - P=$(pwd) &&
63 - (
64 - mkdir -p subdir &&
65 - cd subdir &&
66 - git am "$P/patchfile"
67 - ) &&
68 - git diff master >actual &&
69 - test_cmp expect actual
70 -'
71 -
72 -test_done
t/t4150-am.sh renamed
+34
@@ -223,4 +223,38 @@ test_expect_success 'am fails on empty patch' '
223 ! test -d .dotest
224 '
225
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 +
260 test_done