From 34775e51bd66997a13846c4bebd8623af994a072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Sat, 5 Dec 2015 10:58:14 +0100 Subject: [PATCH] 2015-12-05 10:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + tests/getblock.prg + added test code for GET SetGet block for aliased macro variables --- ChangeLog.txt | 4 ++++ tests/getblock.prg | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/getblock.prg diff --git a/ChangeLog.txt b/ChangeLog.txt index 5ed059cebf..cc052b94d6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-12-05 10:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + + tests/getblock.prg + + added test code for GET SetGet block for aliased macro variables + 2015-12-05 10:05 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/gtos2/gtos2.c ! fixed GCC builds - many thanks to David Macias diff --git a/tests/getblock.prg b/tests/getblock.prg new file mode 100644 index 0000000000..4e5da26d85 --- /dev/null +++ b/tests/getblock.prg @@ -0,0 +1,60 @@ +/* + * Harbour Project source code: + * test code for GET SetGet block for aliased macro variables + * + * Copyright 2015 Przemyslaw Czerpak + * www - http://harbour-project.org + */ + +PROCEDURE Main() + + LOCAL GetList := {}, aStr + MEMVAR idx, fld, als + PRIVATE idx, fld, als + + aStr := { { "F1", "C", 10, 0 }, ; + { "F2", "C", 10, 0 } } + + dbCreate( "_tst1", aStr ) + USE _tst1 NEW + dbAppend() + field->F1 := "FIRST" + field->F2 := "SECOND" + + dbCreate( "_tst2", aStr ) + USE _tst2 NEW + dbAppend() + field->F1 := "first" + field->F2 := "second" + Select( 1 ) + + CLS + + idx := "1" + fld := "F" + idx + als := "_tst" + idx + + @ 1, 0 GET f&idx + @ 2, 0 GET field->f&idx + @ 3, 0 GET _tst1->f&idx + @ 4, 0 GET &als->f&idx + @ 5, 0 GET _tst&idx->f&idx + + @ 7, 0 GET &fld + @ 8, 0 GET field->&fld + @ 9, 0 GET _tst1->&fld + @ 10, 0 GET &als->&fld + @ 11, 0 GET _tst&idx->&fld + + @ 13, 0 GET &als->F1 + @ 14, 0 GET _tst&idx->F1 + + InKey( 0 ) + + idx := "2" + fld := "F" + idx + als := "_tst" + idx + + READ + +RETURN