Files
harbour-core/harbour/tests/files.prg
Viktor Szakats 32b3c2a1cd 2012-10-12 01:41 UTC+0200 Viktor Szakats (harbour syenar.net)
* extras/hbxlsxml/xlsxml.prg
    ! fixed missing UTF-8 mime-type svn prop

  * tests/gtkeys.prg
    ! fixed typo in recent mods causing it to fail under Clipper

  * contrib/hbunix/tests/testdmn.prg
  * contrib/xhb/tfile.prg
  * contrib/xhb/xhberr.prg
  * contrib/xhb/xhbtedit.prg
  * contrib/gtwvg/class.prg
  * contrib/gtwvg/tests/utils.prg
  * contrib/hbnf/dfile.prg
  * contrib/hbgd/tests/counter.prg
  * contrib/hbtip/tests/tipmime.prg
  * src/debug/debugger.prg
  * src/rtl/teditor.prg
  * src/rtl/typefile.prg
  * src/rdd/usrrdd/rdds/logrdd.prg
  * tests/testrdd2.prg
  * tests/inifiles.prg
  * extras/gtwvw/tests/drawimg.prg
  * extras/httpsrv/cgifunc.prg
  * extras/httpsrv/session.prg
    % File() -> hb_FileExists()
    ; pls review me in core

  * contrib/gtwvg/class.prg
  * contrib/gtwvg/menubar.prg
  * contrib/gtwvg/paint.prg
  * contrib/gtwvg/parthdlr.prg
  * contrib/gtwvg/tests/modal.prg
  * contrib/gtwvg/tests/utils.prg
  * contrib/gtwvg/toolbar.prg
    % VALTYPE() -> HB_IS*() and some related optimizations

  * tests/codebloc.prg
  * tests/newrdd.prg
  * tests/inkeytst.prg
  * tests/files.prg
  * tests/testrdd.prg
  * tests/wcecon.prg
  * tests/testrdd2.prg
  * tests/inifiles.prg
    * *LTRIM(STR()) -> hb_ntos()
      (keeping macro for Clipper where seemed necessary)
2012-10-11 23:46:23 +00:00

79 lines
1.4 KiB
Plaintext

/*
* $Id$
*/
// This test was written by Jose Gimenez (JFG) <jfgimenez@wanadoo.es>
// <tecnico.sireinsa@ctv.es>
// and is placed into the public domain.
// Number of files to build/open
#define NFILES 1000
// use only *one* at a time
// dejar solo una de las dos lineas siguientes:
#define WITH_DBFCDX
//#define WITH_ADS
#ifdef WITH_ADS
#include "ads.ch"
REQUEST _ADS
#endif
PROCEDURE Main()
LOCAL aCampos := { { "Codigo", "C", 6, 0 }, { "Nombre", "C", 35, 0 } }
LOCAL n := 0, h := Array( NFILES )
#ifdef WITH_ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
SET SERVER LOCAL
SET FILETYPE TO CDX
SET CHARTYPE TO OEM
SET AXS LOCKING ON
AdsRightsCheck( .F. )
#endif
CLS
AFill( h, 0 )
DO WHILE n < NFILES
n++
@ 10, 0 SAY "Building files.... " + Str( n )
dbCreate( "file" + hb_ntos( n ), aCampos )
USE ( "file" + hb_ntos( n ) ) NEW
#ifdef WITH_ADS
INDEX ON CODIGO TAG CODIGO TO ( "file" + hb_ntos( n ) )
#endif
CLOSE DATA
ENDDO
n := 0
DO WHILE n < NFILES
n++
@ 12, 0 SAY "Opening files.... " + Str( n )
USE ( "file" + hb_ntos( n ) ) NEW
#ifdef WITH_ADS
SET ORDER TO TAG CODIGO
#endif
ENDDO
CLOSE DATA
n := 0
DO WHILE n < NFILES
n++
@ 14, 0 SAY "Deleting files.... " + Str( n )
hb_dbDrop( "file" + hb_ntos( n ) + ".dbf" )
ENDDO
RETURN