3 -- Grant of Unlimited Rights
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7 -- unlimited rights in the software and documentation contained herein.
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
9 -- this public release, the Government intends to confer upon all
10 -- recipients unlimited rights equal to those held by the Government.
11 -- These rights include rights to use, duplicate, release or disclose the
12 -- released technical data and computer software in whole or in part, in
13 -- any manner and for any purpose whatsoever, and to have or permit others
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
26 -- CHECK THAT GET (FOR CHARACTER AND STRINGS) PROPERLY SETS THE
27 -- PAGE, LINE, AND COLUMN NUMBERS AFTER EACH OPERATION.
29 -- APPLICABILITY CRITERIA:
30 -- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT
36 -- JBG 02/22/84 CHANGED TO .ADA TEST
37 -- RJW 11/04/86 REVISED TEST TO OUTPUT A NON_APPLICABLE
38 -- RESULT WHEN FILES ARE NOT SUPPORTED.
39 -- JLH 09/04/87 REMOVED DEPENDENCE ON UNBOUNDED LINE LENGTH AND
40 -- CORRECTED EXCEPTION HANDLING.
41 -- BCB 11/13/87 GAVE SET_LINE_LENGTH PROCEDURE THE FILE VARIABLE
42 -- AS A PARAMETER. REMOVED LINE WHICH SAVED AND
43 -- RESTORED THE LINE LENGTH.
46 WITH REPORT
; USE REPORT
;
47 WITH TEXT_IO
; USE TEXT_IO
;
51 INCOMPLETE
: EXCEPTION;
55 TEST
("CE3602B", "CHECK THAT GET PROPERLY SETS PAGE, LINE, AND " &
60 LINE1
: CONSTANT STRING := "LINE ONE OF TEST DATA FILE";
61 LINE2
: CONSTANT STRING := "LINE TWO";
62 LINE3
: CONSTANT STRING := "LINE THREE";
63 CN
, LN
: POSITIVE_COUNT
;
66 ORIGINAL_LINE_LENGTH
: COUNT
;
70 -- CREATE AND INITIALIZE TEST DATA FILE
73 CREATE
(FILE1
, OUT_FILE
, LEGAL_FILE_NAME
);
76 NOT_APPLICABLE
("USE_ERROR RAISED ON TEXT CREATE " &
77 "WITH OUT_FILE MODE");
80 NOT_APPLICABLE
("NAME_ERROR RAISED ON TEXT " &
81 "CREATE WITH OUT_FILE MODE");
84 FAILED
("UNEXPECTED EXCEPTION RAISED ON " &
89 ORIGINAL_LINE_LENGTH
:= LINE_LENGTH
;
90 SET_LINE_LENGTH
(FILE1
, LINE1
'LENGTH);
93 SET_LINE_LENGTH
(FILE1
, LINE2
'LENGTH);
97 SET_LINE_LENGTH
(FILE1
, LINE3
'LENGTH);
104 OPEN
(FILE1
, IN_FILE
, LEGAL_FILE_NAME
);
107 NOT_APPLICABLE
("USE_ERROR RAISED ON TEXT OPEN " &
108 "WITH IN_FILE MODE");
112 IF COL
(FILE1
) /= 1 THEN
113 FAILED
("COLUMN NUMBER NOT INITIALLY ONE");
116 IF LINE
(FILE1
) /= 1 THEN
117 FAILED
("LINE NUMBER NOT INITIALLY ONE");
120 IF PAGE
(FILE1
) /= 1 THEN
121 FAILED
("PAGE NUMBER NOT INITIALLY ONE");
124 -- TEST COLUMN NUMBER FOR CHARACTER
128 FAILED
("CHARACTER NOT EQUAL TO L - 1");
132 FAILED
("COLUMN NUMBER NOT SET CORRECTLY " &
133 "- GET CHARACTER. COL NUMBER IS" &
137 -- TEST COLUMN NUMBER FOR STRING
142 FAILED
("COLUMN NUMBER NOT SET CORRECTLY " &
143 "- GET STRING. COL NUMBER IS" &
147 -- POSITION CURRENT INDEX TO END OF LINE
149 WHILE NOT END_OF_LINE
(FILE1
) LOOP
154 FAILED
("CHARACTER NOT EQUAL TO E");
157 -- TEST LINE NUMBER FOR CHARACTER
161 FAILED
("CHARACTER NOT EQUAL TO L - 2");
165 FAILED
("LINE NUMBER NOT SET CORRECTLY " &
166 "- GET CHARACTER. LINE NUMBER IS" &
169 IF PAGE
(FILE1
) /= POSITIVE_COUNT
(IDENT_INT
(1)) THEN
170 FAILED
("PAGE NUMBER NOT CORRECT - 1. PAGE IS" &
171 COUNT
'IMAGE(PAGE
(FILE1
)));
174 -- TEST LINE NUMBER FOR STRING
176 WHILE NOT END_OF_LINE
(FILE1
) LOOP
180 IF ST
/= "LINE " THEN
181 FAILED
("INCORRECT VALUE READ - ST");
186 FAILED
("COLUMN NUMBER NOT SET CORRECTLY " &
187 "- GET STRING. COL NUMBER IS" &
191 FAILED
("LINE NUMBER NOT SET CORRECTLY " &
192 "- GET STRING. LINE NUMBER IS" &
195 IF PAGE
(FILE1
) /= POSITIVE_COUNT
(IDENT_INT
(2)) THEN
196 FAILED
("PAGE NUMBER NOT CORRECT - 2. PAGE IS" &
197 COUNT
'IMAGE(PAGE
(FILE1
)));