X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=fa347cddf19074ac48f9ac84d99c4993074f5aef;hb=1233fb1d5d8f67a8f5e970386c1c4cbb6691ec04;hp=0b020f71a79862e5a3510e07528b982ea6a21749;hpb=879793eaf1d6378593f78a192f2961670f686530;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 0b020f7..fa347cd 100644 --- a/Test.obn +++ b/Test.obn @@ -1,11 +1,21 @@ MODULE Test; -IMPORT - Out, - System; +IMPORT Files, Out; + +VAR + f : Files.File; + r : Files.Rider; + len : LONGINT; + x : POINTER TO ARRAY OF CHAR; BEGIN - Out.Open; - Out.String("Hello World!"); Out.Ln; - System.Halt(1); + f := Files.Old("Test.obn"); + ASSERT(f # NIL); + Files.Set(r, f, 0); + + len := Files.Length(f); + NEW(x, len + 1); + + Files.ReadBytes(r, x, len); + Out.String(x^); Out.Ln; END Test.