ResourcePackTests.st
author Claus Gittinger <cg@exept.de>
Tue, 25 Feb 2020 17:19:49 +0100
changeset 2586 7dc7be5a6f3d
parent 2579 bec2c103be07
permissions -rw-r--r--
#OTHER by cg s
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2579
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
     1
"{ Encoding: utf8 }"
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
     2
2574
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'stx:goodies/regression' }"
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: Smalltalk }"
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
TestCase subclass:#ResourcePackTests
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	category:'tests-Regression-UI'
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
2579
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    15
!ResourcePackTests class methodsFor:'queries'!
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    16
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    17
coveredClassNames
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    18
    "These classes can be instrumented for coverage analysis,
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    19
     before running the suite to provide coverage analysis/report"
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    20
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    21
    ^ #( ResourcePack )
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    22
! !
bec2c103be07 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
    23
2574
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!ResourcePackTests methodsFor:'tests'!
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
test01_lineParsing
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
    |p|
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
    p := ResourcePack new.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
    ResourcePack processResourceLine:'''foo1'' ''xlation_of_foo1''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
    self assert:(p at:'foo1') = 'xlation_of_foo1'.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
    "/ c-strings?
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
    ResourcePack processResourceLine:'c''foo2\tfoo'' ''xlation_of_foo2''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
    ResourcePack processResourceLine:'c''foo3\tfoo'' c''xlation_\t_foo3''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
    self assert:(p at:c'foo2\tfoo') = 'xlation_of_foo2'.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
    self assert:(p at:c'foo3\tfoo') = c'xlation_\t_foo3'.
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    "
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
     self run:#test01_lineParsing
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
     self new test01_lineParsing
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    "
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
! !
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
!ResourcePackTests class methodsFor:'documentation'!
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
version_CVS
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    ^ '$Header$'
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
! !
02c1bb012f30 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51