summaryrefslogtreecommitdiff
path: root/tests/test/tstring2.pp
diff options
context:
space:
mode:
authorfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
committerfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
commitf206a9c2b1ae1d8727ca27a96d448b61fdb4c766 (patch)
treef28256ff9964c1fc7c0f7fb00891268a117b745d /tests/test/tstring2.pp
downloadfpc-f206a9c2b1ae1d8727ca27a96d448b61fdb4c766.tar.gz
initial import
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@1 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/test/tstring2.pp')
-rw-r--r--tests/test/tstring2.pp30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test/tstring2.pp b/tests/test/tstring2.pp
new file mode 100644
index 0000000000..9981bb0919
--- /dev/null
+++ b/tests/test/tstring2.pp
@@ -0,0 +1,30 @@
+uses
+ erroru;
+
+procedure chararray2stringtest;
+
+ var
+ a : array[1..10,1..10,1..5] of char;
+ i,j,k,l : integer;
+
+ begin
+ for i:=1 to 10 do
+ a[i,i]:='Hello';
+ i:=1;
+ j:=2;
+ k:=3;
+ l:=4;
+ { test register allocation }
+ if (a[i,i]<>'Hello') or
+ (a[j,j]<>'Hello') or
+ (a[k,k]<>'Hello') or
+ (a[l,l]<>'Hello') then
+ do_error(1000);
+ end;
+
+begin
+ writeln('Misc. shortstring tests');
+ chararray2stringtest;
+ writeln('Misc. shortstring tests successfully passed');
+ halt(0);
+end.