Correct name of diff_flush() in API documentation
[git/platforms/storm.git] / t / t4112-apply-renames.sh
blob70a1859503c7ee6a5b1a6db19174c1c359eec13f
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git apply should not get confused with rename/copy.
10 . ./test-lib.sh
12 # setup
14 mkdir -p klibc/arch/x86_64/include/klibc
16 cat >klibc/arch/x86_64/include/klibc/archsetjmp.h <<\EOF
18 * arch/x86_64/include/klibc/archsetjmp.h
21 #ifndef _KLIBC_ARCHSETJMP_H
22 #define _KLIBC_ARCHSETJMP_H
24 struct __jmp_buf {
25 unsigned long __rbx;
26 unsigned long __rsp;
27 unsigned long __rbp;
28 unsigned long __r12;
29 unsigned long __r13;
30 unsigned long __r14;
31 unsigned long __r15;
32 unsigned long __rip;
35 typedef struct __jmp_buf jmp_buf[1];
37 #endif /* _SETJMP_H */
38 EOF
40 cat >patch <<\EOF
41 diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/cris/klibc/archsetjmp.h
42 similarity index 76%
43 copy from klibc/arch/x86_64/include/klibc/archsetjmp.h
44 copy to include/arch/cris/klibc/archsetjmp.h
45 --- a/klibc/arch/x86_64/include/klibc/archsetjmp.h
46 +++ b/include/arch/cris/klibc/archsetjmp.h
47 @@ -1,21 +1,24 @@
49 - * arch/x86_64/include/klibc/archsetjmp.h
50 + * arch/cris/include/klibc/archsetjmp.h
53 #ifndef _KLIBC_ARCHSETJMP_H
54 #define _KLIBC_ARCHSETJMP_H
56 struct __jmp_buf {
57 - unsigned long __rbx;
58 - unsigned long __rsp;
59 - unsigned long __rbp;
60 - unsigned long __r12;
61 - unsigned long __r13;
62 - unsigned long __r14;
63 - unsigned long __r15;
64 - unsigned long __rip;
65 + unsigned long __r0;
66 + unsigned long __r1;
67 + unsigned long __r2;
68 + unsigned long __r3;
69 + unsigned long __r4;
70 + unsigned long __r5;
71 + unsigned long __r6;
72 + unsigned long __r7;
73 + unsigned long __r8;
74 + unsigned long __sp;
75 + unsigned long __srp;
78 typedef struct __jmp_buf jmp_buf[1];
80 -#endif /* _SETJMP_H */
81 +#endif /* _KLIBC_ARCHSETJMP_H */
82 diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/m32r/klibc/archsetjmp.h
83 similarity index 66%
84 rename from klibc/arch/x86_64/include/klibc/archsetjmp.h
85 rename to include/arch/m32r/klibc/archsetjmp.h
86 --- a/klibc/arch/x86_64/include/klibc/archsetjmp.h
87 +++ b/include/arch/m32r/klibc/archsetjmp.h
88 @@ -1,21 +1,21 @@
90 - * arch/x86_64/include/klibc/archsetjmp.h
91 + * arch/m32r/include/klibc/archsetjmp.h
94 #ifndef _KLIBC_ARCHSETJMP_H
95 #define _KLIBC_ARCHSETJMP_H
97 struct __jmp_buf {
98 - unsigned long __rbx;
99 - unsigned long __rsp;
100 - unsigned long __rbp;
101 + unsigned long __r8;
102 + unsigned long __r9;
103 + unsigned long __r10;
104 + unsigned long __r11;
105 unsigned long __r12;
106 unsigned long __r13;
107 unsigned long __r14;
108 unsigned long __r15;
109 - unsigned long __rip;
112 typedef struct __jmp_buf jmp_buf[1];
114 -#endif /* _SETJMP_H */
115 +#endif /* _KLIBC_ARCHSETJMP_H */
118 find klibc -type f -print | xargs git update-index --add --
120 test_expect_success 'check rename/copy patch' 'git apply --check patch'
122 test_expect_success 'apply rename/copy patch' 'git apply --index patch'
124 test_done