2010-02-26 23:18 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/tget.prg
  * tests/rto_get.prg
    ! Fixed to convert input to uppercase for "Y" picture mask.
    + Added regression test for this case.
This commit is contained in:
Viktor Szakats
2010-02-26 22:19:52 +00:00
parent 3cac472d53
commit 6fba6b8a05
3 changed files with 25 additions and 11 deletions

View File

@@ -17,6 +17,12 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-02-26 23:18 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/tget.prg
* tests/rto_get.prg
! Fixed to convert input to uppercase for "Y" picture mask.
+ Added regression test for this case.
2010-02-26 22:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/rddsql/sddoci/ocidd.c
* Commented trace call.

View File

@@ -1739,7 +1739,7 @@ METHOD Input( cChar ) CLASS GET
::toDecPos()
RETURN ""
CASE ! ( cChar $ "0123456789+" )
CASE !( cChar $ "0123456789+" )
RETURN ""
ENDCASE
EXIT
@@ -1812,7 +1812,8 @@ METHOD Input( cChar ) CLASS GET
ENDIF
CASE cPic == "Y"
IF !( Upper( cChar ) $ "YN" )
cChar := Upper( cChar )
IF !( cChar $ "YN" )
cChar := ""
ENDIF

View File

@@ -167,7 +167,7 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
TEST_LINE( o:colorDisp( "GR/N" ) )
TEST_LINE( o:VarPut( "<hello>" ) )
TEST_LINE( o:display() )
SetPos( 14, 16 ) ; o := _GET_( cStr04, "cStr04" )
TEST_LINE( o:colorSpec := "GR/N" )
TEST_LINE( o:VarPut( "<hello>" ) )
@@ -270,6 +270,13 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
TEST_LINE( o:Picture := "!!" )
TEST_LINE( o:Picture := NIL )
// ; Picture "Y"
SetPos( 14, 16 ) ; o := _GET_( cStr01, "cStr01", "Y",, )
TEST_LINE( o:display() )
TEST_LINE( o:setFocus() )
TGetTOVS( o, { "NnYyAa" } )
// ; Assign
SetPos( 14, 16 ) ; o := _GET_( cStr01, "cStr01", "9999999999",, )
@@ -950,7 +957,7 @@ PROCEDURE TGetAssign( xVar )
SetPos( 14, 16 ) ; o := _GET_( nInt01, "nInt01" ):SetFocus ; TEST_LINE( o:capRow := xVar )
SetPos( 14, 16 ) ; o := _GET_( nInt01, "nInt01" ):SetFocus ; TEST_LINE( o:capCol := xVar )
#endif
s_cTest := "InFocus Assign to C: " + XToStr( xVar )
SetPos( 14, 16 ) ; o := _GET_( cStr01, "cStr01" ):SetFocus ; TEST_LINE( o:BadDate := xVar )
@@ -984,7 +991,7 @@ PROCEDURE TGetAssign( xVar )
SetPos( 14, 16 ) ; o := _GET_( cStr01, "cStr01" ):SetFocus ; TEST_LINE( o:capRow := xVar )
SetPos( 14, 16 ) ; o := _GET_( cStr01, "cStr01" ):SetFocus ; TEST_LINE( o:capCol := xVar )
#endif
s_cTest := "InFocus Assign to D: " + XToStr( xVar )
SetPos( 14, 16 ) ; o := _GET_( dDat01, "dDat01" ):SetFocus ; TEST_LINE( o:BadDate := xVar )
@@ -1018,7 +1025,7 @@ PROCEDURE TGetAssign( xVar )
SetPos( 14, 16 ) ; o := _GET_( dDat01, "dDat01" ):SetFocus ; TEST_LINE( o:capRow := xVar )
SetPos( 14, 16 ) ; o := _GET_( dDat01, "dDat01" ):SetFocus ; TEST_LINE( o:capCol := xVar )
#endif
s_cTest := "InFocus Assign to L: " + XToStr( xVar )
SetPos( 14, 16 ) ; o := _GET_( lLog01, "lLog01" ):SetFocus ; TEST_LINE( o:BadDate := xVar )
@@ -1052,7 +1059,7 @@ PROCEDURE TGetAssign( xVar )
SetPos( 14, 16 ) ; o := _GET_( lLog01, "lLog01" ):SetFocus ; TEST_LINE( o:capRow := xVar )
SetPos( 14, 16 ) ; o := _GET_( lLog01, "lLog01" ):SetFocus ; TEST_LINE( o:capCol := xVar )
#endif
s_cTest := "InFocus Assign to B: " + XToStr( xVar )
SetPos( 14, 16 ) ; o := _GET_( bBlo01, "bBlo01" ):SetFocus ; TEST_LINE( o:BadDate := xVar )
@@ -1671,7 +1678,7 @@ FUNCTION XToStrX( xValue )
cRetVal += ", "
ENDIF
NEXT
RETURN cRetVal + ' }'
CASE cType == "M" ; RETURN 'M:' + xValue
@@ -1710,7 +1717,7 @@ STATIC FUNCTION ErrorMessage( oError )
IF !Empty( oError:filename )
cMessage += oError:filename + " "
ENDIF
IF ValType( oError:Args ) == "A"
cMessage += "A:" + LTrim( Str( Len( oError:Args ) ) ) + ":"
FOR tmp := 1 TO Len( oError:Args )
@@ -1721,11 +1728,11 @@ STATIC FUNCTION ErrorMessage( oError )
NEXT
cMessage += " "
ENDIF
IF oError:canDefault .OR. ;
oError:canRetry .OR. ;
oError:canSubstitute
cMessage += "F:"
IF oError:canDefault
cMessage += "D"