From 373a56828bb90dbb949685121f062775982fd6c3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 4 Oct 2011 21:52:52 +0000 Subject: [PATCH] 2011-10-04 23:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * tests/testpre.prg ! updated for Harbour 3.1.x Patch by Alexey Myronenko --- harbour/ChangeLog | 5 +++++ harbour/tests/testpre.prg | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1d48e454d8..b216334d9e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-10-04 23:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * tests/testpre.prg + ! updated for Harbour 3.1.x + Patch by Alexey Myronenko + 2011-10-01 19:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * ChangeLog * marked two patches merged with 3.0 branch diff --git a/harbour/tests/testpre.prg b/harbour/tests/testpre.prg index db7e7bfcec..9f5ecfdb61 100644 --- a/harbour/tests/testpre.prg +++ b/harbour/tests/testpre.prg @@ -2,40 +2,44 @@ * $Id$ */ +REQUEST __PP_STDRULES + FUNCTION Main() - LOCAL cString + LOCAL cString, l_pp LOCAL i, j, aScript CLS + l_pp := __pp_init() + QOut( "Testing Harbour run-time preprocessing" ) QOut( "======================================" ) QOut( "" ) cString := "@ 10, 10 SAY 'Hello!'" QOut( cString ) - QOut( __Preprocess( cString ) ) + QOut( __pp_process( l_pp, cString ) ) QOut( "" ) cString := "? 'Hello mom'" QOut( cString ) - QOut( __Preprocess( cString ) ) + QOut( __pp_process( l_pp, cString ) ) QOut( "" ) cString := 'SET RELATION TO Something INTO MySelf' QOut( cString ) - QOut( __Preprocess( cString ) ) + QOut( __pp_process( l_pp, cString ) ) QOut( "" ) cString := 'SET RELATION ADDITIVE TO Something INTO YourSelf' QOut( cString ) - QOut( __Preprocess( cString ) ) + QOut( __pp_process( l_pp, cString ) ) QOut( "" ) cString := "#xcommand DEFAULT := => IF == NIL ; := ; END" QOut( cString ) - IF __ppAddRule( cString ) + IF __pp_addRule( l_pp, cString ) QOut( "Rule added successfully !" ) ELSE QOut( "Rule addition failed ..." ) @@ -43,7 +47,7 @@ FUNCTION Main() cString := 'DEFAULT x := 100' QOut( cString ) - QOut( __Preprocess( cString ) ) + QOut( __pp_process( l_pp, cString ) ) QOut( "" ) QOut( "Press ..." ) @@ -62,12 +66,12 @@ FUNCTION Main() 'CLOSE ALL' } FOR j := 1 TO 2 - QOut( iif( j = 1, "Before", "After" ) + " __Preprocess()" ) + QOut( iif( j = 1, "Before", "After" ) + " __pp_process()" ) QOut( "===================" ) QOut( "" ) FOR i := 1 TO Len( aScript ) - ? iif( j = 1, aScript[ i ], __Preprocess( aScript[ i ] ) ) + ? iif( j = 1, aScript[ i ], __pp_process( l_pp, aScript[ i ] ) ) NEXT QOut( "" ) @@ -77,7 +81,3 @@ FUNCTION Main() NEXT RETURN NIL - -EXIT PROCEDURE ExitTest() - __PP_Free() - RETURN