Files
harbour-core/harbour/contrib/hbct/tests/charhist.prg
Viktor Szakats 33e201a481 2012-07-20 21:01 UTC+0200 Viktor Szakats (vszakats syenar.net)
* contrib/hbct/tests/charhist.prg
  * contrib/hbct/tests/csetarge.prg
  * contrib/hbgd/tests/gdtestcl.prg
  * examples/hbapollo/array.prg
  * examples/httpsrv/uhttpd.prg
    * formatting

  * contrib/hbmisc/tests/rtfclass.prg
    ! fixes

  * contrib/hbmisc/tests/rtfclass.prg
  * contrib/hbgd/tests/gdtestcl.prg
    ! fixed to not use OS() with string
      comparisons to detect host OS

  * contrib/gtwvg/wvgdlg.prg
  * contrib/hbide/ideactions.prg
  * contrib/hbide/ideconsole.prg
  * contrib/hbide/idemain.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbide/idetags.prg
  * contrib/hbxbp/tests/xbpqtc.prg
  * examples/gfspell/spell.prg
  * examples/gtwvw/tests/cbtest6.prg
  * examples/gtwvw/tests/ebtest7.prg
  * examples/gtwvw/tests/prog0.prg
  * examples/gtwvw/tests/prog1.prg
  * examples/gtwvw/tests/prog2.prg
  * examples/gtwvw/tests/wvwtest9.prg
  * examples/hbvpdf/hbvpdf.prg
  * examples/hbxlsxml/xlsxml_y.prg
  * examples/hbxlsxml/xlsxml.prg
  * tests/codebloc.prg
  * tests/langmsg.prg
  * tests/memvar.prg
  * tests/statics.prg
  * tests/testwarn.prg
  * tests/tstmacro.prg
    % removed superfluous parantheses from RETURN statements

  * examples/hbapollo/tests/test65.prg
  * examples/hbapollo/tests/test66.prg
  * examples/hbapollo/tests/test77.prg
    ! fixed looking for Windows in fixed location

  * examples/hbapollo/tests/test25.prg
  * examples/hbapollo/tests/test34.prg
  * examples/hbapollo/tests/test35.prg
  * examples/hbapollo/tests/test36.prg
  * examples/hbapollo/tests/test37.prg
  * examples/hbapollo/tests/test38.prg
  * examples/hbapollo/tests/test49.prg
  * examples/hbapollo/tests/test53.prg
  * examples/hbapollo/tests/test56.prg
  * examples/hbapollo/tests/test57.prg
  * examples/hbapollo/tests/test58.prg
    ! removed most hard-wired windows locations
2012-07-20 19:10:42 +00:00

79 lines
2.8 KiB
Plaintext

/*
* $Id$
*/
/*
* Harbour Project source code:
* Test CT3 function CHARHIST()
*
* Copyright 2001 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
* Author: Martin Vogel <vogel@inttec.de>
*
* www - http://harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#include "ct.ch"
PROCEDURE Main()
LOCAL nTotal := 0
ctinit()
QOut( "Begin test of CHARHIST()" )
QOut( "" )
// simple tests
QOut( "Simple tests:" )
QOut( [ charhist("Hello World !")] + "[109] == 3 ? --> ", charhist( "Hello World !" )[ 109 ] )
QOut( [ aeval(charhist("Hello World !"), {| x | nTotal += x } ) ] )
AEval( charhist( "Hello World !" ), {| x | nTotal += x } )
QOut( [ ==> nTotal == len("Hello World !") ? --> ], nTotal == Len( "Hello World !" ) )
QOut( "End test of CHARHIST()" )
QOut( "" )
ctexit()
RETURN