2579
|
1 |
"{ Encoding: utf8 }"
|
|
2 |
|
2574
|
3 |
"{ Package: 'stx:goodies/regression' }"
|
|
4 |
|
|
5 |
"{ NameSpace: Smalltalk }"
|
|
6 |
|
|
7 |
TestCase subclass:#ResourcePackTests
|
|
8 |
instanceVariableNames:''
|
|
9 |
classVariableNames:''
|
|
10 |
poolDictionaries:''
|
|
11 |
category:'tests-Regression-UI'
|
|
12 |
!
|
|
13 |
|
|
14 |
|
2579
|
15 |
!ResourcePackTests class methodsFor:'queries'!
|
|
16 |
|
|
17 |
coveredClassNames
|
|
18 |
"These classes can be instrumented for coverage analysis,
|
|
19 |
before running the suite to provide coverage analysis/report"
|
|
20 |
|
|
21 |
^ #( ResourcePack )
|
|
22 |
! !
|
|
23 |
|
2574
|
24 |
!ResourcePackTests methodsFor:'tests'!
|
|
25 |
|
|
26 |
test01_lineParsing
|
|
27 |
|p|
|
|
28 |
|
|
29 |
p := ResourcePack new.
|
|
30 |
ResourcePack processResourceLine:'''foo1'' ''xlation_of_foo1''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
|
|
31 |
self assert:(p at:'foo1') = 'xlation_of_foo1'.
|
|
32 |
|
|
33 |
"/ c-strings?
|
|
34 |
ResourcePack processResourceLine:'c''foo2\tfoo'' ''xlation_of_foo2''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
|
|
35 |
ResourcePack processResourceLine:'c''foo3\tfoo'' c''xlation_\t_foo3''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
|
|
36 |
self assert:(p at:c'foo2\tfoo') = 'xlation_of_foo2'.
|
|
37 |
self assert:(p at:c'foo3\tfoo') = c'xlation_\t_foo3'.
|
|
38 |
|
|
39 |
|
|
40 |
"
|
|
41 |
self run:#test01_lineParsing
|
|
42 |
self new test01_lineParsing
|
|
43 |
"
|
|
44 |
! !
|
|
45 |
|
|
46 |
!ResourcePackTests class methodsFor:'documentation'!
|
|
47 |
|
|
48 |
version_CVS
|
|
49 |
^ '$Header$'
|
|
50 |
! !
|
|
51 |
|