author | Claus Gittinger <cg@exept.de> |
Thu, 28 Mar 2019 13:04:15 +0100 | |
changeset 2196 | b60b5cc7744c |
parent 2157 | a2696f6efc3b |
child 2399 | 3bb697ebea0e |
permissions | -rw-r--r-- |
867
4bddc8e1d9a1
Added lost Encoding pragma
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
865
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
4bddc8e1d9a1
Added lost Encoding pragma
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
865
diff
changeset
|
2 |
|
1447 | 3 |
"{ Package: 'stx:goodies/regression' }" |
862 | 4 |
|
5 |
"{ NameSpace: RegressionTests }" |
|
6 |
||
7 |
TestCase subclass:#ProjectDefinitionTests |
|
8 |
instanceVariableNames:'' |
|
9 |
classVariableNames:'' |
|
10 |
poolDictionaries:'' |
|
876
b210d31a1c19
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
867
diff
changeset
|
11 |
category:'tests-Regression' |
862 | 12 |
! |
13 |
||
14 |
||
2157 | 15 |
!ProjectDefinitionTests methodsFor:'initialize / release'! |
862 | 16 |
|
17 |
tearDown |
|
18 |
| classes methods | |
|
19 |
||
20 |
"Also, wipe out all mocks" |
|
21 |
classes := OrderedCollection new. |
|
22 |
methods := OrderedCollection new. |
|
23 |
Smalltalk allClassesDo:[:cls| |
|
1447 | 24 |
(cls package notNil and:[cls package startsWith:'stx:goodies/regression/testData']) ifTrue:[ |
25 |
classes add: cls |
|
26 |
] ifFalse:[ |
|
27 |
cls methodsDo:[:m|(m package notNil and:[m package startsWith:'stx:goodies/regression/testData']) ifTrue:[methods add: m]]. |
|
28 |
cls class methodsDo:[:m|(m package notNil and:[m package startsWith:'stx:goodies/regression/testData']) ifTrue:[methods add: m]]. |
|
29 |
] |
|
862 | 30 |
]. |
31 |
Class withoutUpdatingChangesDo:[ |
|
1447 | 32 |
classes do:[:cls|Smalltalk removeClass: cls]. |
33 |
methods do:[:m|m mclass removeSelector: m selector] |
|
862 | 34 |
]. |
35 |
||
36 |
"Created: / 22-03-2013 / 11:31:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
37 |
! ! |
|
38 |
||
39 |
!ProjectDefinitionTests methodsFor:'tests - utf8'! |
|
40 |
||
41 |
test_filein_01 |
|
42 |
" |
|
43 |
Test of filein of a class with non-ASCII/ISO8859-1 chars |
|
44 |
" |
|
45 |
| file | |
|
46 |
||
1884 | 47 |
file := Helper packageDirectoryForRegressionTests / 'testData' / 'packages' / 'p1utf8' / 'ProjectDefinitionTestsP1UTF8Bar.st'. |
862 | 48 |
self assert: file exists. |
49 |
||
50 |
file fileIn. |
|
51 |
||
52 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) notNil. |
|
53 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) new zork size = 38. |
|
54 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) new zork = 'Příliš žluťoučký kůň úpěl ďábelské ódy'. |
|
55 |
||
56 |
"Created: / 22-03-2013 / 11:39:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
57 |
! |
|
58 |
||
865 | 59 |
test_filein_01b |
60 |
" |
|
61 |
Test of filein of a class with non-ASCII/ISO8859-1 chars |
|
62 |
" |
|
63 |
| file | |
|
64 |
||
65 |
file := (Smalltalk getPackageDirectoryForPackage: self class package) / 'testData' / 'packages' / 'p1utf8' / 'ProjectDefinitionTestsP1UTF8Bar.st'. |
|
66 |
self assert: file exists. |
|
67 |
||
68 |
file contents asString readStream fileIn. |
|
69 |
||
70 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) notNil. |
|
71 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) new zork size = 38. |
|
72 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) new zork = 'Příliš žluťoučký kůň úpěl ďábelské ódy'. |
|
73 |
||
74 |
"Created: / 25-03-2013 / 22:51:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
75 |
! |
|
76 |
||
862 | 77 |
test_filein_03 |
78 |
" |
|
79 |
Test of filein of a extension with non-ASCII/ISO8859-1 chars |
|
80 |
" |
|
81 |
| file | |
|
82 |
||
83 |
file := (Smalltalk getPackageDirectoryForPackage: self class package) / 'testData' / 'packages' / 'p1utf8' / 'extensions.st'. |
|
84 |
self assert: file exists. |
|
85 |
||
86 |
file fileIn. |
|
87 |
||
88 |
self assert: nil zork size = 38. |
|
89 |
self assert: nil zork = 'Příliš žluťoučký kůň úpěl ďábelské ódy'. |
|
90 |
||
91 |
"Created: / 22-03-2013 / 11:40:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
92 |
! |
|
93 |
||
94 |
test_loadPackage_utf8_01 |
|
95 |
" |
|
96 |
Test of filein of a extension with non-ASCII/ISO8859-1 chars |
|
97 |
" |
|
98 |
||
1369 | 99 |
Transcript showCR:'loading p1utf8 package...'. |
1371 | 100 |
[ |
1447 | 101 |
Smalltalk loadPackage: 'stx:goodies/regression/testData/packages/p1utf8'. |
1371 | 102 |
] ifCurtailed:[ |
1447 | 103 |
thisContext fullPrintAll |
104 |
]. |
|
1369 | 105 |
Transcript showCR:'done.'. |
862 | 106 |
|
107 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) notNil. |
|
108 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) new zork size = 38. |
|
109 |
self assert: (Smalltalk at:#ProjectDefinitionTestsP1UTF8Bar) new zork = 'Příliš žluťoučký kůň úpěl ďábelské ódy'. |
|
110 |
||
111 |
self assert: nil zork size = 38. |
|
112 |
self assert: nil zork = 'Příliš žluťoučký kůň úpěl ďábelské ódy'. |
|
113 |
||
1369 | 114 |
Transcript showCR:'test done.'. |
1447 | 115 |
Smalltalk unloadPackage: 'stx:goodies/regression/testData/packages/p1utf8'. |
1369 | 116 |
|
862 | 117 |
"Created: / 22-03-2013 / 11:44:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
118 |
! ! |
|
119 |
||
1087
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
120 |
!ProjectDefinitionTests methodsFor:'tests-obsolete'! |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
121 |
|
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
122 |
test1 |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
123 |
self skipIf:true description:'obsolete and outdated'. |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
124 |
|
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
125 |
DAPASX::DapasXProject compileClassNames. |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
126 |
self assert:(DAPASX::DapasXProject classNames asSortedCollection = DAPASX::DapasXProject searchForClassesNamesWithProject asSortedCollection) |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
127 |
|
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
128 |
"Modified: / 09-08-2006 / 18:22:16 / fm" |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
129 |
! ! |
b76941bb0907
class: RegressionTests::ProjectDefinitionTests
Claus Gittinger <cg@exept.de>
parents:
876
diff
changeset
|
130 |
|
862 | 131 |
!ProjectDefinitionTests class methodsFor:'documentation'! |
132 |
||
133 |
version |
|
134 |
^ '$Header$' |
|
135 |
! |
|
136 |
||
137 |
version_CVS |
|
138 |
^ '$Header$' |
|
139 |
! ! |
|
140 |