Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
- All source *.st files are now Unicode UTF8 without BOM
Files are in two groups (fileOut works this way in Smalltalk/X):
- containing a unicode character have "{ Encoding: utf8 }" at the header
- ASCII only are without the header
"{ Package: 'stx:goodies/petitparser/tests' }"
"{ NameSpace: Smalltalk }"
PPAbstractParserTest subclass:#PPConditionalParserTests
instanceVariableNames:'context'
classVariableNames:''
poolDictionaries:''
category:'PetitTests-Tests'
!
!PPConditionalParserTests methodsFor:'as yet unclassified'!
context
^ context
!
setUp
super setUp.
context := PPContext new
!
testConditionCtxAccess
| parser |
parser := ('a' asParser if: [ :ctx | (ctx propertyAt: #foo) = #bar ]).
context propertyAt: #foo put: #bar.
self assert: parser parse: 'a' .
context propertyAt: #foo put: #zorg.
self assert: parser fail: 'a' .
!
testConditionFalse
| parser |
parser := ('a' asParser if: [ :ctx | false ]).
self assert: parser fail: 'a'.
self assert: parser fail: 'b'.
!
testConditionTrue
| parser |
parser := ('a' asParser if: [ :ctx | true ]).
self assert: parser parse: 'a'.
self assert: parser fail: 'b'.
! !
!PPConditionalParserTests class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
! !