Files
harbour-core/harbour/tests/testpre.prg
Viktor Szakats 10aaae71c2 2011-09-11 13:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbformat/hbfmtcls.prg
    ! fixed casing of some function names.

  * utils/hbmk2/hbmk2.prg
    ; all changes below apply to .xhp (xMate) to .hbp conversion:
    ! properly convert input filenames with spaces in them
    ! remove lib prefix from .a input filenames
    % do not add empty -L options
    * do not add include paths with %HB_INSTALL%\ in them
    + split non-portable, Borland-specific include path lists 
      concatenated with ';' into distinct -I options
    % do not add empty include paths

  * tests/testop.prg
  * tests/testntx.prg
  * tests/vmasort.prg
  * tests/testlbl.prg
  * tests/testidle.prg
  * tests/videotst.prg
  * tests/testmem.prg
  * tests/testinit.prg
  * tests/testhtml.prg
  * tests/tstcolor.prg
  * tests/vidtest.prg
  * tests/tstuse.prg
  * tests/vec1.prg
  * tests/while.prg
  * tests/tstdspac.prg
  * tests/version.prg
  * tests/testpre.prg
  * tests/tstprag.prg
    * formatted. mostly with hbformat.
2011-09-11 11:02:02 +00:00

84 lines
1.7 KiB
Plaintext

/*
* $Id$
*/
FUNCTION Main()
LOCAL cString
LOCAL i, j, aScript
CLS
QOut( "Testing Harbour run-time preprocessing" )
QOut( "======================================" )
QOut( "" )
cString := "@ 10, 10 SAY 'Hello!'"
QOut( cString )
QOut( __Preprocess( cString ) )
QOut( "" )
cString := "? 'Hello mom'"
QOut( cString )
QOut( __Preprocess( cString ) )
QOut( "" )
cString := 'SET RELATION TO Something INTO MySelf'
QOut( cString )
QOut( __Preprocess( cString ) )
QOut( "" )
cString := 'SET RELATION ADDITIVE TO Something INTO YourSelf'
QOut( cString )
QOut( __Preprocess( cString ) )
QOut( "" )
cString := "#xcommand DEFAULT <v1> := <x1> => IF <v1> == NIL ; <v1> := <x1> ; END"
QOut( cString )
IF __ppAddRule( cString )
QOut( "Rule added successfully !" )
ELSE
QOut( "Rule addition failed ..." )
ENDIF
cString := 'DEFAULT x := 100'
QOut( cString )
QOut( __Preprocess( cString ) )
QOut( "" )
QOut( "Press <Enter>..." )
__Accept( "" )
CLS
aScript := { 'cMyDatabase := "dontknow.dbf"', ;
'USE (cMyDatabase)', ;
'GO TOP', ;
'', ;
'? MYFIELD, YOURFIELD', ;
'', ;
'WAIT "Press <Enter> key..."', ;
'', ;
'CLOSE ALL' }
FOR j := 1 TO 2
QOut( iif( j = 1, "Before", "After" ) + " __Preprocess()" )
QOut( "===================" )
QOut( "" )
FOR i := 1 TO Len( aScript )
? iif( j = 1, aScript[ i ], __Preprocess( aScript[ i ] ) )
NEXT
QOut( "" )
QOut( "Press <Enter> key..." )
__Accept( "" )
CLS
NEXT
RETURN NIL
EXIT PROCEDURE ExitTest()
__PP_Free()
RETURN