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

"{ Encoding: utf8 }"

"{ Package: 'stx:goodies/regression' }"

"{ NameSpace: Smalltalk }"

TestCase subclass:#ResourcePackTests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'tests-Regression-UI'
!


!ResourcePackTests class methodsFor:'queries'!

coveredClassNames
    "These classes can be instrumented for coverage analysis,
     before running the suite to provide coverage analysis/report"

    ^ #( ResourcePack )
! !

!ResourcePackTests methodsFor:'tests'!

test01_lineParsing
    |p|

    p := ResourcePack new.
    ResourcePack processResourceLine:'''foo1'' ''xlation_of_foo1''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
    self assert:(p at:'foo1') = 'xlation_of_foo1'.

    "/ c-strings?
    ResourcePack processResourceLine:'c''foo2\tfoo'' ''xlation_of_foo2''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
    ResourcePack processResourceLine:'c''foo3\tfoo'' c''xlation_\t_foo3''' encoding:nil file:'dummy.rc' printErrorWith:[:err | Logger warn:err] for:p keepUselessTranslations:false.
    self assert:(p at:c'foo2\tfoo') = 'xlation_of_foo2'.
    self assert:(p at:c'foo3\tfoo') = c'xlation_\t_foo3'.


    "
     self run:#test01_lineParsing
     self new test01_lineParsing
    "
! !

!ResourcePackTests class methodsFor:'documentation'!

version_CVS
    ^ '$Header$'
! !