+ contrib/hbgt/tests
+ contrib/hbgt/tests/test.prg
+ contrib/hbmisc/tests/rtfclass.prg
- tests/rtfclass.prg
- tests/test10.prg
- tests/testgt.prg
* tests/ac_test.prg
* tests/alias.prg
* tests/begin.prg
* tests/boxtest.prg
* tests/cdow.prg
* tests/clasinh.prg
* tests/dates.prg
* tests/dates2.prg
* tests/dates3.prg
* tests/dates4.prg
* tests/ddate.prg
* tests/debugtst.prg
* tests/delimtst.prg
* tests/devtest.prg
* tests/disptest.prg
* tests/foreach.prg
* tests/gtstdtst.prg
* tests/ipclnt.prg
* tests/ipsvr.prg
* tests/langapi.prg
* tests/memtst.prg
* tests/memvar.prg
* tests/menutest.prg
* tests/mousetst.prg
* tests/multiarg.prg
* tests/newrdd.prg
* tests/nums.prg
* tests/objarr.prg
* tests/objasign.prg
* tests/objects.prg
* tests/omacro.prg
* tests/onidle.prg
* tests/os.prg
* tests/output.prg
* tests/overload.prg
* tests/parexpr.prg
* tests/passref.prg
* tests/procline.prg
* tests/procname.prg
* tests/recursiv.prg
* tests/returns.prg
* tests/round.prg
* tests/say.prg
* tests/sbartest.prg
* tests/scroll.prg
* tests/sdf_test.prg
* tests/seconds.prg
* tests/server.prg
* tests/set_num.prg
* tests/set_test.prg
* tests/setkeys.prg
* tests/sound.prg
* tests/speed.prg
* tests/statfun.prg
* tests/statics.prg
* tests/statics1.prg
* tests/statics2.prg
* tests/statinit.prg
* tests/strdelim.prg
* tests/stripem.prg
* tests/switch.prg
* tests/symbolt.prg
* tests/t1.prg
* tests/tb1.prg
* tests/testbrdb.prg
* tests/testbrw.prg
* tests/testcdx.prg
* tests/testcls.prg
* tests/testdbf.prg
* tests/testdecl.prg
* tests/testerro.prg
* tests/testfor.prg
* tests/testget.prg
* tests/testhrb.prg
* tests/testhtml.prg
* tests/testidle.prg
* tests/testmem.prg
* tests/testpers.prg
* tests/testtok.prg
* tests/testwarn.prg
* tests/tstalias.prg
* tests/tstasort.prg
* tests/tstblock.prg
* tests/tstdbi.prg
* tests/tstmacro.prg
* tests/varparam.prg
* tests/wvt_fs.prg
* cleaning up tests
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
//NOTEST
|
|
/*
|
|
* $Id$
|
|
*/
|
|
|
|
// Test program for COPY TO DELIMITED and APPEND FROM DELIMITED
|
|
// Note: Only COPY TO DELIMITED is fully implemented at this time...
|
|
/* Harbour Project source code
|
|
http://harbour-project.org/
|
|
Donated to the public domain on 2001-04-18 by David G. Holm <dholm@jsd-llc.com>
|
|
*/
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL nCount := 0
|
|
|
|
USE test NEW
|
|
// Copy all records and fields.
|
|
COPY TO test1 DELIMITED
|
|
|
|
// Copy only address fields for records with salary over 50,000.
|
|
COPY FIELD first, last, street, city, state, zip TO test2 delimited for _field->salary > 50000
|
|
|
|
// Only copy record 3.
|
|
COPY RECORD 3 TO test3 DELIMITED
|
|
|
|
// Copy records 4 through 7.
|
|
COPY NEXT 4 TO test4 DELIMITED
|
|
|
|
// Try to copy 10 records, starting 5 records from EOF, using WHILE
|
|
GO BOTTOM
|
|
skip -4
|
|
COPY WHILE ncount++ < 9 TO test4a DELIMITED
|
|
|
|
// Copy the last 10 records.
|
|
GO BOTTOM
|
|
skip -9
|
|
COPY REST TO test5 DELIMITED
|
|
|
|
// Copy the last 10 records again.
|
|
GO BOTTOM
|
|
skip -9
|
|
COPY TO test6 delimited WHILE ! EOF()
|
|
|
|
// Copy only some of the last 10 records.
|
|
GO BOTTOM
|
|
skip -9
|
|
COPY REST TO test7 DELIMITED FOR _field->married
|
|
|
|
// Try to append from a file that we know does not exist.
|
|
DELETE file test8.txt
|
|
APPEND FROM test8 delimited
|
|
QUIT
|