X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=f47edbbb416fd2154a0f16c7bfbaf310923269bc;hb=98752831dc061590acffee7e68a075f8c18cb132;hp=8c3a8d1458efc80ddf4837c106b664b70a3abfae;hpb=9f8036eb00032fa7f756113365cb42e05ab262df;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 8c3a8d1..f47edbb 100644 --- a/Test.obn +++ b/Test.obn @@ -1,18 +1,23 @@ MODULE Test; -IMPORT Out; +IMPORT Files; + +TYPE + String = POINTER TO ARRAY OF CHAR; + R* = RECORD ch : CHAR END; VAR - msg : ARRAY 20 OF CHAR; + f : Files.File; + r : Files.Rider; + m : R; + s : String; BEGIN - Out.Open; - COPY("Hello World!", msg); - Out.String(msg); Out.Ln; - COPY("Hell!", msg); - Out.String(msg); Out.Ln; - COPY("The quick brown fox jumps over the lazy dog", msg); - Out.String(msg); Out.Ln; - msg := "Hello World!"; - Out.String(msg); Out.Ln; + f := Files.Old("Test.obn"); + ASSERT(f # NIL); + Files.Set(r, f, 0); + + Files.Read(r, m.ch); + + ASSERT(s = NIL); END Test.