author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sat, 01 Dec 2012 01:00:13 +0000 | |
changeset 118 | 5a8b78ad48ae |
parent 116 | b690f5845323 |
child 123 | ee1cc926f489 |
permissions | -rw-r--r-- |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
1 |
"{ Package: 'stx:libscm/mercurial' }" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
2 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
3 |
HGTestCase subclass:#HGStXTests |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
4 |
instanceVariableNames:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
5 |
classVariableNames:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
6 |
poolDictionaries:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
7 |
category:'SCM-Mercurial-Tests' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
8 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
9 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
10 |
!HGStXTests class methodsFor:'documentation'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
11 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
12 |
documentation |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
13 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
14 |
Tests for Mercurial-Smalltalk/X integration. Mapping packages |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
15 |
to Mercurial repositories, commitning packages from image |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
16 |
and so on... |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
17 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
18 |
[author:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
19 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
20 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
21 |
[instance variables:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
22 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
23 |
[class variables:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
24 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
25 |
[see also:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
26 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
27 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
28 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
29 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
30 |
!HGStXTests methodsFor:'running'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
31 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
32 |
loadPackage: packageId |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
33 |
"A utility method to prepare a repository for package |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
34 |
and load package from it" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
35 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
36 |
self repositoryNamed: (packageId copyReplaceAll:$: with:$/). |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
37 |
Smalltalk loadPackage: packageId. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
38 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
39 |
"Created: / 16-11-2012 / 20:01:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
40 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
41 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
42 |
tearDown |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
43 |
| classes methods | |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
44 |
super tearDown. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
45 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
46 |
"Also, wipe out all mocks" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
47 |
classes := OrderedCollection new. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
48 |
methods := OrderedCollection new. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
49 |
Smalltalk allClassesDo:[:cls| |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
50 |
(cls package notNil and:[cls package startsWith:'mocks']) ifTrue:[ |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
51 |
classes add: cls |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
52 |
] ifFalse:[ |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
53 |
cls methodsDo:[:m|(m package notNil and:[m package startsWith:'mocks']) ifTrue:[methods add: cls]]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
54 |
cls class methodsDo:[:m|(m package notNil and:[m package startsWith:'mocks']) ifTrue:[methods add: cls]]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
55 |
] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
56 |
]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
57 |
Class withoutUpdatingChangesDo:[ |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
58 |
classes do:[:cls|Smalltalk removeClass: cls]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
59 |
methods do:[:m|m mclass removeSelector: m selector] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
60 |
]. |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
61 |
"/ Delay waitForSeconds: 1. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
62 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
63 |
"Created: / 16-11-2012 / 19:00:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
64 |
"Modified: / 21-11-2012 / 17:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
65 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
66 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
67 |
test_infrastructure |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
68 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
69 |
This is kind of meta-test that tests if the |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
70 |
setUp/tearDown actually works. Especially, if |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
71 |
no mock classes/methods are left in the image |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
72 |
after tearDown. Also, make sure that all |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
73 |
HGPackageModels for mocks |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
74 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
75 |
| pm | |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
76 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
77 |
self loadPackage:'mocks:hg/p1'. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
78 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
79 |
self assert: (Smalltalk at: #'mocks_hg_p1') notNil. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
80 |
pm := HGPackageModelRegistry packageNamed:'mocks:hg/p1'. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
81 |
self assert: pm notNil. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
82 |
self assert: ((HGPackageModelRegistry current instVarNamed:#packages) includesKey: #'mocks:hg/p1'). |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
83 |
|
95
83ee62dc9491
HGCommand: fixes for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
93
diff
changeset
|
84 |
pm := nil. |
91 | 85 |
self cleanup. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
86 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
87 |
self assert: (Smalltalk at: #'mocks_hg_p1') isNil. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
88 |
self assert: repositories isNil. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
89 |
self assert: ((HGPackageModelRegistry current instVarNamed:#packages) includesKey: #'mocks:hg/p1') not. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
90 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
91 |
"Created: / 16-11-2012 / 19:25:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 92 |
"Modified: / 20-11-2012 / 19:32:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
95
83ee62dc9491
HGCommand: fixes for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
93
diff
changeset
|
93 |
"Modified: / 22-11-2012 / 15:31:54 / jv" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
94 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
95 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
96 |
!HGStXTests methodsFor:'tests - commit'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
97 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
98 |
test_commit_01 |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
99 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
100 |
Simple commit |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
101 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
102 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
103 |
| repo pm ct | |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
104 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
105 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
106 |
Smalltalk loadPackage:'mocks:hg/p1'. |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
107 |
self dumpRepositoryLog: repo. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
108 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
109 |
|
73
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
110 |
self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
111 |
|
73
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
112 |
(MockHGP1Bar compile:'zork ^ 1' classified:'test') package: MockHGP1Bar package. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
113 |
pm := HGPackageModel named: 'mocks:hg/p1'. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
114 |
ct := pm commitTask. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
115 |
ct message:'test_commit_01'. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
116 |
ct do. |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
117 |
self dumpRepositoryLog: repo. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
118 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
119 |
" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
120 |
repo workingCopy browse |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
121 |
" |
73
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
122 |
self assert: ((repo @ 2 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
111
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
123 |
self assert: (Smalltalk at:#mocks_hg_p1) hgLogicalRevision revno = 2. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
124 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
125 |
"Created: / 16-11-2012 / 18:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
111
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
126 |
"Modified: / 28-11-2012 / 09:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 127 |
! |
128 |
||
129 |
test_commit_02a |
|
130 |
" |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
131 |
Repeated commit |
91 | 132 |
" |
133 |
||
134 |
| repo pm ct | |
|
135 |
||
136 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
|
137 |
Smalltalk loadPackage:'mocks:hg/p1'. |
|
138 |
pm := HGPackageModel named: 'mocks:hg/p1'. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
139 |
self dumpRepositoryLog: repo. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
140 |
|
91 | 141 |
(MockHGP1Bar compile:'zork ^ 1' classified:'test') package: MockHGP1Bar package. |
142 |
||
143 |
self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
144 |
||
145 |
ct := pm commitTask. |
|
146 |
ct message:'test_commit_02-1'. |
|
147 |
ct do. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
148 |
self dumpRepositoryLog: repo. |
91 | 149 |
|
150 |
self assert: ((repo @ 2 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
151 |
self assert: ((repo @ 2 ) parent1 == (repo @ 1 )). |
|
152 |
||
153 |
(MockHGP1Bar compile:'zork ^ 2' classified:'test') package: MockHGP1Bar package. |
|
154 |
||
155 |
ct := pm commitTask. |
|
156 |
ct message:'test_commit_02-2'. |
|
157 |
ct do. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
158 |
self dumpRepositoryLog: repo. |
91 | 159 |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
160 |
self assert: (repo @ 3) message = 'test_commit_02-2'. |
91 | 161 |
self assert: ((repo @ 3 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 2'). |
162 |
self assert: ((repo @ 3 ) parent1 == (repo @ 2 )). |
|
163 |
||
164 |
" |
|
165 |
repo workingCopy browse |
|
166 |
" |
|
167 |
||
168 |
"Created: / 20-11-2012 / 19:33:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
169 |
"Modified: / 22-11-2012 / 11:12:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 170 |
! |
171 |
||
172 |
test_commit_02b |
|
173 |
" |
|
174 |
Repeated commit, remove the working copy between commits |
|
175 |
" |
|
176 |
||
177 |
| repo pm ct | |
|
178 |
||
179 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
|
180 |
Smalltalk loadPackage:'mocks:hg/p1'. |
|
181 |
pm := HGPackageModel named: 'mocks:hg/p1'. |
|
182 |
(MockHGP1Bar compile:'zork ^ 1' classified:'test') package: MockHGP1Bar package. |
|
183 |
||
184 |
self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
185 |
||
186 |
ct := pm commitTask. |
|
187 |
ct message:'test_commit_02-1'. |
|
188 |
ct do. |
|
189 |
||
190 |
self assert: ((repo @ 2 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
191 |
self assert: ((repo @ 2 ) parent1 == (repo @ 1 )). |
|
192 |
||
193 |
(MockHGP1Bar compile:'zork ^ 2' classified:'test') package: MockHGP1Bar package. |
|
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
116
diff
changeset
|
194 |
pm temporaryWorkingCopy path recursiveRemove. |
91 | 195 |
|
196 |
ct := pm commitTask. |
|
197 |
ct message:'test_commit_02-2'. |
|
198 |
ct do. |
|
199 |
||
200 |
self assert: ((repo @ 3 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 2'). |
|
201 |
self assert: ((repo @ 3 ) parent1 == (repo @ 2 )). |
|
202 |
||
203 |
" |
|
204 |
repo workingCopy browse |
|
205 |
" |
|
206 |
||
207 |
"Created: / 20-11-2012 / 19:35:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
116
diff
changeset
|
208 |
"Modified: / 01-12-2012 / 00:30:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 209 |
! |
210 |
||
211 |
test_commit_03a |
|
212 |
" |
|
213 |
Two images A, B working in parallel, commiting to same repo |
|
214 |
||
215 |
1) A: checkout, modify commit package (cs1) |
|
216 |
2) B: checkout, commit change (cs2) |
|
217 |
2) A: modify, checkout (cs3) |
|
218 |
||
219 |
The changeset cs3 should have cs1 as its parent1 |
|
100
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
220 |
|
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
221 |
<skip> |
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
222 |
|
91 | 223 |
" |
224 |
||
225 |
| repo pmA ctA wcB s | |
|
226 |
||
227 |
"=== A modifies & commits =============================== " |
|
228 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
|
229 |
Smalltalk loadPackage:'mocks:hg/p1'. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
230 |
self dumpRepositoryLog: repo. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
231 |
|
91 | 232 |
pmA := HGPackageModel named: 'mocks:hg/p1'. |
233 |
(MockHGP1Bar compile:'zork ^ 1' classified:'test') package: MockHGP1Bar package. |
|
234 |
||
235 |
self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
236 |
||
237 |
ctA := pmA commitTask. |
|
238 |
ctA message:'test_commit_03a A-1'. |
|
239 |
ctA do. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
240 |
self dumpRepositoryLog: repo. |
91 | 241 |
|
242 |
self assert: ((repo @ 2 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
243 |
self assert: ((repo @ 2 ) parent1 == (repo @ 1 )). |
|
244 |
||
245 |
"=== B modifies & commits =============================== " |
|
246 |
wcB := repo workingCopy. |
|
247 |
s := ( wcB / 'abbrev.stc' ) appendStream. |
|
248 |
[ s nextPutLine:'# Modification '] ensure:[s close]. |
|
249 |
wcB commit: 'test_commit_03a B-2'. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
250 |
self dumpRepositoryLog: repo. |
91 | 251 |
self assert: ((repo @ 3 ) parent1 == (repo @ 1 )). |
252 |
||
253 |
||
254 |
"=== A modifies & commits =============================== " |
|
255 |
(MockHGP1Bar compile:'zork ^ 2' classified:'test') package: MockHGP1Bar package. |
|
256 |
||
257 |
ctA := pmA commitTask. |
|
258 |
ctA message:'test_commit_03a A-3'. |
|
259 |
ctA do. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
260 |
self dumpRepositoryLog: repo. |
91 | 261 |
|
262 |
self assert: ((repo @ 4 ) parent1 == (repo @ 2 )). |
|
263 |
||
264 |
" |
|
265 |
repo workingCopy browse |
|
266 |
" |
|
267 |
||
268 |
"Created: / 20-11-2012 / 19:45:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
91
diff
changeset
|
269 |
"Modified: / 22-11-2012 / 11:16:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 270 |
! |
271 |
||
272 |
test_commit_03b |
|
273 |
" |
|
274 |
Two images A, B working in parallel, commiting to same repo |
|
275 |
||
276 |
1) A: checkout, modify commit package (cs1) |
|
277 |
2) B: checkout, commit change (cs2) |
|
278 |
3) A: flushes its temp working copy |
|
279 |
4) A: modify, checkout (cs3) |
|
280 |
||
281 |
The changeset cs3 should have cs1 as its parent1 |
|
282 |
" |
|
283 |
||
284 |
| repo pmA ctA wcB s | |
|
285 |
||
286 |
"=== A modifies & commits =============================== " |
|
287 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
|
288 |
Smalltalk loadPackage:'mocks:hg/p1'. |
|
289 |
pmA := HGPackageModel named: 'mocks:hg/p1'. |
|
290 |
(MockHGP1Bar compile:'zork ^ 1' classified:'test') package: MockHGP1Bar package. |
|
291 |
||
292 |
self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
293 |
||
294 |
ctA := pmA commitTask. |
|
295 |
ctA message:'test_commit_03a A-1'. |
|
296 |
ctA do. |
|
297 |
||
298 |
self assert: ((repo @ 2 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1'). |
|
299 |
self assert: ((repo @ 2 ) parent1 == (repo @ 1 )). |
|
300 |
||
301 |
"=== B modifies & commits =============================== " |
|
302 |
wcB := repo workingCopy. |
|
303 |
s := ( wcB / 'abbrev.stc' ) appendStream. |
|
304 |
[ s nextPutLine:'# Modification '] ensure:[s close]. |
|
305 |
wcB commit: 'test_commit_03a B-2'. |
|
306 |
self assert: ((repo @ 3 ) parent1 == (repo @ 1 )). |
|
307 |
||
308 |
"=== A flushed its working copy ========================= " |
|
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
116
diff
changeset
|
309 |
pmA temporaryWorkingCopy path recursiveRemove. |
91 | 310 |
|
311 |
||
312 |
"=== A modifies & commits =============================== " |
|
313 |
(MockHGP1Bar compile:'zork ^ 2' classified:'test') package: MockHGP1Bar package. |
|
314 |
||
315 |
ctA := pmA commitTask. |
|
316 |
ctA message:'test_commit_03a A-3'. |
|
317 |
ctA do. |
|
318 |
||
319 |
self assert: ((repo @ 4 ) parent1 == (repo @ 2 )). |
|
320 |
||
321 |
" |
|
322 |
repo workingCopy browse |
|
323 |
" |
|
324 |
||
325 |
"Created: / 20-11-2012 / 19:51:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
116
diff
changeset
|
326 |
"Modified: / 01-12-2012 / 00:30:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 327 |
! |
328 |
||
329 |
test_commit_03c |
|
330 |
" |
|
331 |
Two images A, B working in parallel, commiting to same repo |
|
332 |
||
333 |
(cs1) - base changeset |
|
334 |
2) B: checkout, modifu, commit change (cs2) |
|
335 |
4) A: checkout, modify, commit change (cs3) |
|
336 |
||
337 |
The changeset cs3 should have cs1 as its parent1 |
|
338 |
" |
|
339 |
||
340 |
| repo pmA ctA wcB s | |
|
341 |
||
342 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
|
343 |
Smalltalk loadPackage:'mocks:hg/p1'. |
|
344 |
pmA := HGPackageModel named: 'mocks:hg/p1'. |
|
345 |
||
346 |
"=== B modifies & commits =============================== " |
|
347 |
wcB := repo workingCopy. |
|
348 |
s := ( wcB / 'abbrev.stc' ) appendStream. |
|
349 |
[ s nextPutLine:'# Modification '] ensure:[s close]. |
|
350 |
wcB commit: 'test_commit_03c B-1'. |
|
351 |
self assert: ((repo @ 2 ) parent1 == (repo @ 1 )). |
|
352 |
||
353 |
"=== A modifies & commits =============================== " |
|
354 |
(MockHGP1Bar compile:'zork ^ 2' classified:'test') package: MockHGP1Bar package. |
|
355 |
||
356 |
ctA := pmA commitTask. |
|
357 |
ctA message:'test_commit_03c A-2'. |
|
358 |
ctA do. |
|
359 |
||
360 |
self assert: ((repo @ 3 ) parent1 == (repo @ 1 )). |
|
361 |
||
362 |
" |
|
363 |
repo workingCopy browse |
|
364 |
" |
|
365 |
||
366 |
"Created: / 20-11-2012 / 20:00:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
107
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
367 |
"Modified: / 27-11-2012 / 22:16:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
91 | 368 |
! ! |
369 |
||
98
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
370 |
!HGStXTests methodsFor:'tests - misc'! |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
371 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
372 |
test_misc_fileReleaseAndRevisionNr |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
373 |
" |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
374 |
ProjectDefinition>>fileReleaseNr and ProjectDefinition>>fileRevisionNr |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
375 |
are used to generate package.rc used on Windows. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
376 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
377 |
String returned must be an integer and must be a valid short value |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
378 |
- otherwise, BCC won't compile/link the library. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
379 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
380 |
If this test fail it means that implementation fileReleaseNr/fileRevisionNr |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
381 |
is rubbish. As of 2012-11-23, it uses 'self revision' and expects |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
382 |
(but does not check!!) the resulting string is in X.Y form. In mercurial, |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
383 |
#revision returns node id (SHA1 hash string). |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
384 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
385 |
It has to be fixed there!! |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
386 |
" |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
387 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
388 |
| repo | |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
389 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
390 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
391 |
Smalltalk loadPackage:'mocks:hg/p1'. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
392 |
|
100
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
393 |
self assert: ((Smalltalk at:#'mocks_hg_p1') fileReleaseNr allSatisfy:[:c|c isDigit]). |
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
394 |
self assert: ((Smalltalk at:#'mocks_hg_p1') fileReleaseNr asInteger < 16r7FFF). |
98
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
395 |
|
100
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
396 |
self assert: ((Smalltalk at:#'mocks_hg_p1') fileRevisionNr allSatisfy:[:c|c isDigit]). |
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
397 |
self assert: ((Smalltalk at:#'mocks_hg_p1') fileRevisionNr asInteger < 16r7FFF). |
98
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
398 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
399 |
"Created: / 23-11-2012 / 11:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
400 |
! |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
401 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
402 |
test_misc_hgRevision_01 |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
403 |
| repo | |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
404 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
405 |
repo := self repositoryNamed: 'mocks/hg/p1'. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
406 |
Smalltalk loadPackage:'mocks:hg/p1'. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
407 |
self dumpRepositoryLog: repo. |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
408 |
|
116
b690f5845323
Class revision ID refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
409 |
self assert: (Smalltalk at:#'mocks_hg_p1') hgLogicalRevision asString = '1:e0bec585af86'. |
98
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
410 |
|
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
411 |
"Created: / 23-11-2012 / 11:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
116
b690f5845323
Class revision ID refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
412 |
"Modified: / 30-11-2012 / 23:44:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
98
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
413 |
! ! |
8982e002d0ab
HGStXTests: added tests for ProjectDefinition>>fileRevisionNr/fileRevisionNr.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
414 |
|
91 | 415 |
!HGStXTests methodsFor:'utilities'! |
416 |
||
417 |
cleanup |
|
418 |
"Wipeout all mock package leftovers. Could be used |
|
419 |
to simulate work from another fresh image" |
|
420 |
||
421 |
self tearDown |
|
422 |
||
423 |
"Created: / 20-11-2012 / 19:32:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
424 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
425 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
426 |
!HGStXTests class methodsFor:'documentation'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
427 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
428 |
version_HG |
115
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
429 |
|
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
430 |
^ '$Changeset: <not expanded> $' |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
431 |
! ! |