1 * Preliminary tests for a few things in the i/o library.
2 * Thrown together by Dave Love not from specific bug reports --
6 parameter (fmt='(1x,i3,f5.1)')
7 * Scratch file makes sure we can use one and avoids dealing with
8 * explicit i/o in the testsuite.
9 open(90, status='scratch') ! try a biggish unit number
10 write(90, '()') ! extra record for interest
11 * Formatted i/o can go wild (endless loop AFAIR) if we're wrongly
12 * assuming an ANSI sprintf.
13 write(90, fmt) 123, 123.0
14 backspace 90 ! backspace problems reported on DOSish systems
17 if (i/=123 .or. nint(r)/=123) call abort
18 rewind 90 ! make sure we can rewind too
21 if (i/=123 .or. nint(r)/=123) call abort
23 * Make sure we can do unformatted i/o OK. This might be
24 * problematic on DOS-like systems if we've done an fopen in text
26 open(90, status='scratch', access='direct', form='unformatted',
28 write(90, rec=1) 123, 123.0
30 if (i/=123 .or. nint(r)/=123) call abort
32 open(90, status='scratch', form='unformatted')
36 if (i/=123 .or. nint(r)/=123) call abort
38 * Fails at 1998-09-01 on spurious recursive i/o check (fixed by
39 * 1998-09-06 libI77 change):
40 open(90, status='scratch', form='formatted', recl=16,
42 write(90, '(i8,f8.1)',rec=1) 123, 123.0
43 read(90, '(i8,f8.1)', rec=1) i, r
44 if (i/=123 .or. nint(r)/=123) call abort