Project

General

Profile

« Previous | Next » 

Revision 951

Added some unit tests for the Bazaar adapter.

View differences:

trunk/doc/RUNNING_TESTS
1
Creating test repositories
2
===================
3

  
4
mkdir tmp/test
5

  
6
Subversion
7
----------
8
svnadmin create tmp/test/subversion_repository
9
gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load tmp/test/subversion_repository
10

  
11
Bazaar
12
------
13
gunzip < test/fixtures/repositories/bazaar_repository.tar.gz | tar -xv -C tmp/test
0 14

  
trunk/test/fixtures/repositories/subversion_repository.dump
1
SVN-fs-dump-format-version: 2
2

  
3
UUID: 54439772-bf7c-654d-b6c6-528e40cb36d2
4

  
5
Revision-number: 0
6
Prop-content-length: 56
7
Content-length: 56
8

  
9
K 8
10
svn:date
11
V 27
12
2007-09-10T16:46:04.453125Z
13
PROPS-END
14

  
15
Revision-number: 1
16
Prop-content-length: 112
17
Content-length: 112
18

  
19
K 7
20
svn:log
21
V 15
22
Initial import.
23
K 10
24
svn:author
25
V 2
26
jp
27
K 8
28
svn:date
29
V 27
30
2007-09-10T16:54:38.484000Z
31
PROPS-END
32

  
33
Node-path: subversion_test
34
Node-kind: dir
35
Node-action: add
36
Prop-content-length: 10
37
Content-length: 10
38

  
39
PROPS-END
40

  
41

  
42
Revision-number: 2
43
Prop-content-length: 112
44
Content-length: 112
45

  
46
K 7
47
svn:log
48
V 15
49
Initial import.
50
K 10
51
svn:author
52
V 2
53
jp
54
K 8
55
svn:date
56
V 27
57
2007-09-10T16:54:52.203000Z
58
PROPS-END
59

  
60
Node-path: subversion_test/.project
61
Node-kind: file
62
Node-action: add
63
Prop-content-length: 10
64
Text-content-length: 219
65
Text-content-md5: 6ca948b340b02ac5ee54c647cc964d9d
66
Content-length: 229
67

  
68
PROPS-END
69
<?xml version="1.0" encoding="UTF-8"?>
70
<projectDescription>
71
	<name>subversion_test</name>
72
	<comment></comment>
73
	<projects>
74
	</projects>
75
	<buildSpec>
76
	</buildSpec>
77
	<natures>
78
	</natures>
79
</projectDescription>
80

  
81

  
82
Node-path: subversion_test/folder
83
Node-kind: dir
84
Node-action: add
85
Prop-content-length: 10
86
Content-length: 10
87

  
88
PROPS-END
89

  
90

  
91
Node-path: subversion_test/folder/greeter.rb
92
Node-kind: file
93
Node-action: add
94
Prop-content-length: 40
95
Text-content-length: 227
96
Text-content-md5: f6e7a960573db1f6274e48c0a42b520a
97
Content-length: 267
98

  
99
K 13
100
svn:eol-style
101
V 6
102
native
103
PROPS-END
104
# The Greeter class
105
class Greeter
106
  def initialize(name)
107
    @name = name.capitalize
108
  end
109
 
110
  def salute
111
    puts "Hello #{@name}!"
112
  end
113
end
114
 
115
# Create a new object
116
g = Greeter.new("world")
117
 
118
# Output "Hello World!"
119
g.salute
120

  
121

  
122
Node-path: subversion_test/folder/subfolder
123
Node-kind: dir
124
Node-action: add
125
Prop-content-length: 10
126
Content-length: 10
127

  
128
PROPS-END
129

  
130

  
131
Node-path: subversion_test/folder/subfolder/rubylogo.gif
132
Node-kind: file
133
Node-action: add
134
Prop-content-length: 59
135
Text-content-length: 8576
136
Text-content-md5: bf864bc5278fd4f4facdf39673bb6d37
137
Content-length: 8635
138

  
139
K 13
140
svn:mime-type
141
V 24
142
application/octet-stream
143
PROPS-END
144
GIF89aKw?????????????????????????????????????????????????????????????????????????????¿??????????????????????罽???𵵿??絵????賬ﮮ箮???߮?童襥???椝ݥ???????杜???皖???ߚ?敔ݕ????̙?ה????捌ߏ?指???֏???????ߊ?ύ????????zъ?惃?{{ރ?݄z?}z?||Ձ?ss?{x?ss?yv?|z????ur?}{?sr?up?||?lm?ff?sl?qq?lj?jd?kf?jj?me?de?mb?jj?nn?b_?da?da?ff?aZ?ll?\Y?ZS?WP?YY?``?RK?XN?SR?YW?TI?KQ?ZZ?JC?KKfff?GD?C;?JJ?B:?@=?DD?BB?;3?4<?==?99?GG?11?11?/*?::?33?60?**OOO?5+?77?'?)!?))?//?$,?!!?'#?-"? ??"?)&?  ?))? ??$???  ??????**?"??))??!??????
-
-??
145
????333?	??	???	??????z?
146
????		???	?????		?????}???????	??q??	?|s??|tf!?1,Kw?cH????*\Ȱ?Ç#J?H??ŋ3j?ȱ?Ǐ C?I??ɓ(S?\ɲ?˗0cʜI??͛8s??ɳ?ϟ@?
147
J??ѣH?*]ʴ?ӧP?J?J??իX?j?ʵ?ׯ`ÊK??ٳhӪ]˶-?<?`?‡#N?M???;n?h? ???VH?QDK?;?]U*U+[̀3?.^<Tzp @LZ?<x????PCft	T?V??IC7γgM@??({.??żrT?X#P?6?
148
&m۶q?????W/P??s
149
?E.mڐ![F?~?rhICg??F???w?h?4?lS?=?h?ރ2	???1???K}?P@?
-i?q?#??(??:????yƨ????8?\x?f??2{@g?aJ6??M???7???2VYRe0??9?(3?2?h???!??2??.?M3K.)͒)???;?ȃ?V???9??Ζ??͡aZ(f??ٰ&3?BM3?4c?4p??͒v?O-4?A	M?a???B??AM??:???s?9׈3
-???h?|T<
150
??LZi2?f???w?M??ϳ?>??>	?/?Ī????z뗹??!}f???Zc)??6?9ܜC9?"?R?:O??LK?N
151
?k;?lk???*?7`?i!??ua.<!?7?x??4ݱs?9?,<?D?(??2ʄ?QK?B??8Y?H?|?????
-??8?2P $q-@?\??۠s?;???=ш??v?????@J%D;3?5}?J<??s??v???&?c|/`?^.???C#@!)?{?7[?N?|>?
-?t?E	?S?1???DJf?m?
152
???M?<?<???vY????bPTQ?`|?FL???Ӈ?C????D4???A4????'u??L2t6??nӊ????3?_???'????q?{???.5?p3o?!?A??q???%9?<L>?L8?6ӕ?V	????(?h`? &?D<???D#?u?'^?r???a???!\?&?'?????SG8?W??j
153
?????b???&?j?"?B??+???x???p?=?q?{??~??A?5J˅.9???EC??ػF??a?.??P?2TQ?:????ȣeZQ
154
[??<?G???+?0?
155
?"??B0?$???sv03??JX?Q<B?h?*ps[????0P	?v?????--$f?4??y??ER?e??ӈ?n?J
156
|X?J[h??4?Qj?C???>?qZ>˖??7u?H^????%IgFab?t??`?gJ???'>?1?
-h?V?̦6ρo???\?J??1?%?@B??.`"U?X?97b??Ir??k?%Odz?,
157
X?)??~?Ә?C???$uh?????!s9?h?? ??_A??_t?8???[~m?y??`?z8??c?0??3?n?h-?$??A֙zիꨩ=???[4??H?v9??Bu ?3j??گ&??k?`?@??H~?c#??2G?@?p?d?9=?q???jG%ZC?A??`f??h??x??P\"N}? \8?A?pT??Ds?hBb9???ymlB????zn?)?U?1:ҽ???,ضRX³??,Y??]?.????][?JT!??k\c N??C??@p
-R6h?P!΂???rģ?`.s??-?
158
3g?hG??v?????-?2? ?ja???*???-H
159
??W?D??Lh??孷J?C=|??n?Y5G7l?????@g%<0
160
??€?G ???`??.???&?MȈ??׳d??-m?9?}??s.?nji?
-?6???"ձ?ݖ?nx`M?l????#???Q?=?ю9T?_?H?m?`????{?-?
-R???X ???O?,??L??Ǒˑ?v??Y
-)Ϻ1??eK
161
?
162
?:??Z{?Kf?T?F???r?9hq? ?~?F?E}<?
163
Ju??|?;?թ?^<?@_i????m??%?#[^?5?Zf*?6??<=??%?E????[?V???/?U`??s??}????t?G%`4!	`?????Ͷ>Z?."t;???b????#}????@?]?A?wij?a?j>2?8`?f;۝q?(	X@?ì???9?R?uA??-???9
164
In?W???7?	B?????P?}CjR??hGx?f8?x?h	T?@r`??]j>'Y?o?:?e????
-}????I???)?k
-_x?y?Ej&ϑ?=0j???j?1>???`C????p??E?5ғ^?ޖ??1?}?xCZ?^Hm?,O?oӟ??ל???8?"z.@??A??`3?b?F????3^jo?T????	A???~???w???pQ??ܱѶ?n?#?|??Q?$`? 7`h`???0k??wG{?2p{?l?u??X?VG?o	?	?"Q??{U"eP
-? 
-??y?Gt2`n?j?
165
@?Q>wp>?>??{&~?d?
166
o?t*?T-?{!F???x?ve?bb1W??X\ㅬ???`???f??6F?n&Y?
167
@i 	E?d?@q??g??"D?	?"??b?oW??W%x?Q^!???i?G-P	??
168
?P?? vd??en?U?`	
- t?	TA??A4	?	?@n?'E?w?@	?~?E?a??$&^f,?,?7u??,g?6&???	??ぃ??geGj???????H??PDET
169
?0	ŀ????w???-˖oƖ |???uq?"????P?
170
טNƍ???d@
171
??p	D???aGu?	?0????+C?![?W?????,?&f?wų#?
172
??`??V?}????
-y?1?g?U?P???ĎYG??
173
y?G?0n? ??z?V?-??¸?W8?te?W)???eT?P??[?9&?r?
174
ɐ?'78vGg	p
175
??z?
176
????JVs?(E?@tlch?
177
?Tiy?]X?We1PR?^[?9??5????QXp?*"?e?x)	z	?b??2e?m*??9??A?I??J΄?wk})???? qC??Mp?_?????w?/ ?9??t.???`?K?p<?[?B?9r?Н4D?X ??i??P)?p?j?d?@krb?G?T?????H???"ι?+>??5qU??8?a?X?????	nu?ul%P??Be:9???<?CBRm????	???̀?H7O`k??1?????L*MԤO?????
-?"??0t6x9?D?*nК\???[
178
??Q6?H3P?8?RP?y0??	??
179
{??0oPxV??M?JMАO??O.՗M?h??ѩְSQfJ?–?29`C "?p?sZ??P
-?rz?k?r?
-??L?
180
?T?.??k?@??GQڜ???}?c?Ge3y??Z0A
181
 !p:m ??
182
??
183
?`~?+O?M???????-?TV???X)?T??S??b
-?`
184
2Β??"v??pF+?3?m?9???(?pʧw݂?05+?Veՠ???S
185
S???
-???Q<?p?1?? 	??mx???a.B??0??31??]?%?X?????
186
??`
-׀
-հpk?W??P????B??	??
187
01?4
-P@.@yPt?FF?a&ez*???g[Հ
-D??x??????I3*p?@.k?Xtw9?<?
188
???|?%e?????{????D??di?q\9o	F/PJЀ
189
g??~?/??;h0a4{Hc?[V???Ʈ?
190
?????+kA?)ڞ??Hj"K Z[?=P?C;??L?׺FF??Y?0H???ۛ???Pl??HPMƐ??	ya???_?}q ???
191
ѩ?K?y??6?E?Ut??{?Sj
-??X?%????%?2??*?LX?OŲ
-m???}i0?v???	Vj{{G?d???i?J?೵?g?????R?L{*???T?????<l*/?kC|*dY?QQ??~Q?P
-??
-?@_0??s?|??
192
&l?E??7??l??k?܋???pñ??i???Zcx?E.f?s?P?F[?P9?s??Z)?????0,L$
-}pZ???(	???}?;?.2H???F??+ô??*???_??P??MQ??f6?ţ?ecbs?eS?!????
-???,	A???P?dƛ??H?C׮?k??P????A,???|\C?I??@ˋ8?EE??v?E?#?5?????1?
-?`???ؑ???d?Y????VWt??????Ω??	?Z???E^?	+Y????J?&Xyl?n@???Y΢Q4?h??p?1@?B9?2-???????Tr???'?B??ґ0??R2?	???A[??E3s?I??D5??????^??p^???L?r??F
-H??"?_\G?&?Ϟ??\ ??P?OY
193
ŀ????*?]j?Zz??;???P	??U6A\<??????uȕ?<%??<?\2?J[??W?????*,(6???&?[[??,?\2?`\?]Ԅ`???LJ%3?ۺ?BÍ?ŭ?A???B??W????ܿ]2??}l??t!?dHp]?????Ͱ	?aG??
194
',?~?y?????d?P
-?ͽ???p
195
??ZAǦ???t?m?T6??B 
-??V65???u??U\?i[W6??5?h.\e?Q?#~U??^yN-ڜ??0??1????&?Q??>? 
196
?1?2?%Q:??j)\??2\t<??ϊ?1M?
-?PS???)?}??K?綺Ӷ-???Ή????Po;?&?)g*??Ξ???wP??ba3?ȧ??[?????-?f???*?'\?u<?^?[
197
??s;y??YV?Pg??˟?	?6?=ϛ??YF?F?eމ|ìp3??D+r?P
198
?)?Š?
-???~??kU'L=?@??ְ? ??	?@??*(s?-?G?u??b?L??EW???????9?1豮??%?>-X?*?,??ʳ?'6?e??????~^??l??u?	?B?????1?????υc',R?҄????V??m??ʶ????????	vp/<??¢c?M?$H?7]xMU???f
199
O???%)NނL;a??e?????I??~?i&??em?QV??&????K??sk???\)??"??F??????w?ɨ"?dT0$_
-??7??g;??AZ4??SԆ???\???<_Ws?/?<???i?[%s??&Q????U<X???????4?k"?&8?>_??_?@.??~??1؈???Ԥ?z
-r??<~?F?-?D????ޠ?{
200
UP%@?\???]??5?B_???>?pf?f????y?F_x,?@c??Q??3??<X??P??`t??>b4???>7-,???E???qt??A??H??H??6??Q?L?-??l?8t=߽#?
-?kD??k?4i<??ƃ??T{U?1m?T???ռ6??X?X?J?^?u?N	??L}??(@h?>}4,????E??pl??
-??x????e?]?	?#??^BV:?1?}?J>#?EB?'????3Cr?G???{pزi?f?{?>?????bݻ???????	??>????ꂎ????C?I??(?bӦ?Ï?R?N?N?????j??????g??,V<??`?Y+WxP/C
-7???г??
201
Xh8?D?MD?TTo?O?PD?8|qF?`??Ee?Dk??F;iǸ|?Ǜm???yܱ?u?C????R'*?dJ?*??k?A?h???t1?SN?$?u?YǕ??3O???A/=?4PA%4C?(??v??I??aGs??r)K?ZJK??
202
?n??F?`??E?5t?O>i$?t?Y??Bg%?????V]w??<[?j?&?|Rk???+??
203
?u?r??g?I'?r?	?k?1&???|?K>???F?Ɨ
-|
-?X0k?]y祷????F?yҝq$Ej????Y?68Zxf?`j??)c?dŕS:?ĐJV9?^??9d????s???Ir?'YK	??Yi?B?f???u??&_nY??GyAd??F:i<?8?{?q?Iz???e?1eVf??>8??{f???^????5???D0T:n??NZ?@?????y?????-?kF??l????UD?$KQ????C?1Ƹ"?(6?<?9?b?G'??^h!Y??[o????o?]?_d???C6?`?
-2? ?3ָ<y?/???(?^?1(0?z?Ǔ??Ca??frA?G??>?#:? >~⇟?x6????gs̛??7?1?{D`-??#???d?? ?5?!
-f?`?`??3hЃqh?????'C
204
??B??-YМ?6?/?a
205
e?Bj?Їs??@/<?	K0?ֆ?Z??l??І2???_???.r?_?B?@'?1	Qp???)Xa
206
o??Ҙ??ю ?`?#?шGԂ??4|??????4???,C$%??/PR??B?@Nr2	NHB(???$(?	J@????D!w?e,{e?9(aD?c.??E-t?
207
Z?%+Y?KZ?X??/4S???B4?*0????B??n?D?&?? ??Dg:??*ؒA ??pxf???,???OL?Sq?j?ZA
208
P`Z&A~??`=?v????5Ё?N??tC'(?
-z????@?A??0F??S?7?&rZ)?ԧ=}????!AEBx?T? 8?AdpT??;?H?gR?v?"xAl?ю???8eZC?P??խn=h??M%?ӮGxgX?T???6??\??ְ,`A
-B?U?r??/?lp?Rv9?75?͆?U?E?QCZ"a??5kjq?????/0l
209
\ ??ֶ'@P ??????k_??`3iH??\?&??<t???T??9?vo?????.x?
210
f[[??&Az?k?? ,??o?{G? ??%n~k?_???J?`?.?????
-` ??3hZ0??@???@??d?(??|E?????&??x[?Ķ?ň?l?|`?
211
W??u?
212
\0?	??$?zA??
-??E????|`??<q???W?'X?	P?e.w??5~?
-llc????+PA??l6{?o?4?d%[?????l?	P????]?|???????^F7??#(?}?|b_??>f3??g8????D-?????$
213
?wЯ?T???z?M?u?u=????W???L?! ?" ?/Ё4??3?#0?<???6???<?????X?D?X?gv??݆>??k=?Z??????.0~?[?ӎ@?~m??0x???6?7ZF0?T?Jf??t??g@(?afw@0??/`?}???ޖ@??m?7`
214
X@??s???8??p??c@A& ?
215
<`O7?0u? ?W??W>?g???^??Ѐ?3@Ox?{> ?? ܣh?ם^?(`m8<??>x?@@??e?mƏ??g/??%??#???<ؾyγ??ڭ????????퍷~?
216
?ի>u?K?????0]?? ??=?e?_W	? p?7???|?gOu?G????}??}????'?????d<0??	??W??ֿ~???????C?~??) ;
217

  
218
Node-path: subversion_test/helloworld.rb
219
Node-kind: file
220
Node-action: add
221
Prop-content-length: 40
222
Text-content-length: 173
223
Text-content-md5: 43a160386b7ee483c29d539c0913b8a8
224
Content-length: 213
225

  
226
K 13
227
svn:eol-style
228
V 6
229
native
230
PROPS-END
231
# The famous Hello World
232
# program is trivial in
233
# Ruby. You don't need:
234
#
235
# * a "main" method
236
# * newline escapes
237
# * semicolons
238
#
239
# Here's the code:
240
 
241
puts "Hello World!"
242

  
243

  
244
Node-path: subversion_test/textfile.txt
245
Node-kind: file
246
Node-action: add
247
Prop-content-length: 10
248
Text-content-length: 858
249
Text-content-md5: 03ea5a32eb93a93d73f57c9d4446b8cf
250
Content-length: 868
251

  
252
PROPS-END
253
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus.
254
Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor.
255
Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.
256
Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat.
257
Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue.
258
Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede.
259
Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales.
260
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh.
261
Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit.
262

  
263

  
264
Revision-number: 3
265
Prop-content-length: 145
266
Content-length: 145
267

  
268
K 7
269
svn:log
270
V 48
271
2 files modified:
272
* helloworld.rb
273
* textfile.txt
274
K 10
275
svn:author
276
V 2
277
jp
278
K 8
279
svn:date
280
V 27
281
2007-09-10T16:56:48.468000Z
282
PROPS-END
283

  
284
Node-path: subversion_test/helloworld.rb
285
Node-kind: file
286
Node-action: change
287
Text-content-length: 152
288
Text-content-md5: b4d6efe024dd1fce5de9c96a212341d9
289
Content-length: 152
290

  
291
# The famous Hello World
292
# program is trivial in
293
# Ruby. You don't need:
294
#
295
# * a "main" method
296
# * newline escapes
297
# * semicolons
298
 
299
puts "Hello World!"
300

  
301

  
302
Node-path: subversion_test/textfile.txt
303
Node-kind: file
304
Node-action: change
305
Text-content-length: 756
306
Text-content-md5: 167df05d8f87cc2e04bb20aa3abe731d
307
Content-length: 756
308

  
309
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus.
310
Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor.
311
Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.
312
Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat.
313
Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede.
314
Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales.
315
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh.
316
Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit.
317

  
318

  
319
Revision-number: 4
320
Prop-content-length: 110
321
Content-length: 110
322

  
323
K 7
324
svn:log
325
V 13
326
C file added.
327
K 10
328
svn:author
329
V 2
330
jp
331
K 8
332
svn:date
333
V 27
334
2007-09-10T16:58:29.875000Z
335
PROPS-END
336

  
337
Node-path: subversion_test/helloworld.c
338
Node-kind: file
339
Node-action: add
340
Prop-content-length: 10
341
Text-content-length: 92
342
Text-content-md5: a0ae86da4c00baeb9546e7addef7723d
343
Content-length: 102
344

  
345
PROPS-END
346
#include <stdio.h>
347

  
348
int main(void)
349
{
350
    printf("hello, world\n");
351

  
352
    return 0;
353
}
354

  
355

  
356
Revision-number: 5
357
Prop-content-length: 129
358
Content-length: 129
359

  
360
K 7
361
svn:log
362
V 32
363
Modified one file in the folder.
364
K 10
365
svn:author
366
V 2
367
jp
368
K 8
369
svn:date
370
V 27
371
2007-09-10T17:01:08.078000Z
372
PROPS-END
373

  
374
Node-path: subversion_test/folder/greeter.rb
375
Node-kind: file
376
Node-action: change
377
Text-content-length: 229
378
Text-content-md5: 8cb28f1b0d87596118ccaf87a06b44ed
379
Content-length: 229
380

  
381
# The Greeter class
382
class Greeter
383
  def initialize(name)
384
    @name = name.capitalize
385
  end
386
 
387
  def salute
388
    puts "Bonjour #{@name}!"
389
  end
390
end
391
 
392
# Create a new object
393
g = Greeter.new("world")
394
 
395
# Output "Hello World!"
396
g.salute
397

  
398

  
399
Revision-number: 6
400
Prop-content-length: 135
401
Content-length: 135
402

  
403
K 7
404
svn:log
405
V 38
406
Moved helloworld.rb from / to /folder.
407
K 10
408
svn:author
409
V 2
410
jp
411
K 8
412
svn:date
413
V 27
414
2007-09-10T17:01:47.687000Z
415
PROPS-END
416

  
417
Node-path: subversion_test/folder/helloworld.rb
418
Node-kind: file
419
Node-action: add
420
Node-copyfrom-rev: 3
421
Node-copyfrom-path: subversion_test/helloworld.rb
422

  
423

  
424
Node-path: subversion_test/helloworld.rb
425
Node-action: delete
426

  
427

  
428
Revision-number: 7
429
Prop-content-length: 114
430
Content-length: 114
431

  
432
K 7
433
svn:log
434
V 17
435
Removed one file.
436
K 10
437
svn:author
438
V 2
439
jp
440
K 8
441
svn:date
442
V 27
443
2007-09-10T17:02:16.609000Z
444
PROPS-END
445

  
446
Node-path: subversion_test/folder/greeter.rb
447
Node-action: delete
448

  
449

  
450
Revision-number: 8
451
Prop-content-length: 138
452
Content-length: 138
453

  
454
K 7
455
svn:log
456
V 41
457
This commits references an issue.
458
Refs #2
459
K 10
460
svn:author
461
V 2
462
jp
463
K 8
464
svn:date
465
V 27
466
2007-09-10T17:04:35.859000Z
467
PROPS-END
468

  
469
Node-path: subversion_test/helloworld.c
470
Node-kind: file
471
Node-action: change
472
Text-content-length: 90
473
Text-content-md5: 8757c8cdd0c061db15ec78fba6a2653c
474
Content-length: 90
475

  
476
#include <stdio.h>
477

  
478
int main(void)
479
{
480
    printf("hello, world\n");
481
    return 0;
482
}
483

  
484

  
trunk/test/unit/repository_bazaar_test.rb
1
# redMine - project management software
2
# Copyright (C) 2006-2007  Jean-Philippe Lang
3
#
4
# This program is free software; you can redistribute it and/or
5
# modify it under the terms of the GNU General Public License
6
# as published by the Free Software Foundation; either version 2
7
# of the License, or (at your option) any later version.
8
# 
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
# 
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17

  
18
require File.dirname(__FILE__) + '/../test_helper'
19

  
20
class RepositoryBazaarTest < Test::Unit::TestCase
21
  fixtures :projects
22
  
23
  # No '..' in the repository path
24
  REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + 'tmp/test/bazaar_repository'
25
  
26
  def setup
27
    @project = Project.find(1)
28
    assert @repository = Repository::Bazaar.create(:project => @project, :url => "file:///#{REPOSITORY_PATH}")
29
  end
30
  
31
  if File.directory?(REPOSITORY_PATH)  
32
    def test_fetch_changesets_from_scratch
33
      @repository.fetch_changesets
34
      @repository.reload
35
      
36
      assert_equal 4, @repository.changesets.count
37
      assert_equal 9, @repository.changes.count
38
      assert_equal 'Initial import', @repository.changesets.find_by_revision(1).comments
39
    end
40
    
41
    def test_fetch_changesets_incremental
42
      @repository.fetch_changesets
43
      # Remove changesets with revision > 5
44
      @repository.changesets.find(:all, :conditions => 'revision > 2').each(&:destroy)
45
      @repository.reload
46
      assert_equal 2, @repository.changesets.count
47
      
48
      @repository.fetch_changesets
49
      assert_equal 4, @repository.changesets.count
50
    end
51
    
52
    def test_entries
53
      entries = @repository.entries
54
      assert_equal 2, entries.size
55
      
56
      assert_equal 'dir', entries[0].kind
57
      assert_equal 'directory', entries[0].name
58
      
59
      assert_equal 'file', entries[1].kind
60
      assert_equal 'doc-mkdir.txt', entries[1].name
61
    end
62
    
63
    def test_entries_in_subdirectory
64
      entries = @repository.entries('directory')
65
      assert_equal 3, entries.size
66

  
67
      assert_equal 'file', entries.last.kind
68
      assert_equal 'edit.png', entries.last.name
69
    end
70
    
71
    def test_cat
72
      cat = @repository.scm.cat('directory/document.txt')
73
      assert cat =~ /Write the contents of a file as of a given revision to standard output/
74
    end
75
    
76
    def test_annotate
77
      annotate = @repository.scm.annotate('doc-mkdir.txt')
78
      assert_equal 17, annotate.lines.size
79
      assert_equal 1, annotate.revisions[0].identifier
80
      assert_equal 'jsmith@', annotate.revisions[0].author
81
      assert_equal 'mkdir', annotate.lines[0]
82
    end
83
  else
84
    puts "Bazaar test repository NOT FOUND. Skipping tests !!!"
85
    def test_fake; assert true end
86
  end
87
end
0 88

  
trunk/test/unit/repository_subversion_test.rb
50 50
    end
51 51
  else
52 52
    puts "Subversion test repository NOT FOUND. Skipping tests !!!"
53
    def test_fake; assert false end
53
    def test_fake; assert true end
54 54
  end
55 55
end

Also available in: Unified diff