"{ Package: 'stx:goodies/regression' }"
"{ NameSpace: RegressionTests }"
TestCase subclass:#Widgets
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'tests-Regression-UI'
!
!Widgets class methodsFor:'queries'!
coveredClassNames
"should be redefined to return a collection of classes which are tested by
this suite/case.
If not redefined, coveredPackageNames should be.
These classes can be instrumented for coverage analysis,
before running the suite to provide coverage analysis/report"
^ #( EditTextView )
"Created: / 06-07-2011 / 21:27:03 / cg"
"Modified: / 21-03-2019 / 13:02:41 / Claus Gittinger"
! !
!Widgets methodsFor:'tests'!
test10_editTextView
|editWidget rslt|
editWidget := EditTextView new.
editWidget contents:c'line1\nline2\nline3'.
"/ notice the additional newline at the end
self assert:(editWidget contents = c'line1\nline2\nline3\n').
self assert:(editWidget cursorLine == 1).
self assert:(editWidget cursorCol == 1).
rslt := editWidget lineStringBeforeCursor.
self assert:(rslt = '').
editWidget cursorLine:2 col:1.
rslt := editWidget lineStringBeforeCursor.
self assert:(rslt = '').
editWidget cursorLine:2 col:3.
rslt := editWidget lineStringBeforeCursor.
self assert:(rslt = 'li').
editWidget cursorLine:2 col:20.
rslt := editWidget lineStringBeforeCursor.
self assert:(rslt = 'line2').
"
self new test10_editTextView
"
"Created: / 21-03-2019 / 13:02:23 / Claus Gittinger"
! !
!Widgets class methodsFor:'documentation'!
version_CVS
^ '$Header$'
! !