xref: /original-bsd/usr.bin/f77/libU77/test/chdtst.f (revision 3839ed90)
1C
2C Copyright (c) 1980 The Regents of the University of California.
3C All rights reserved.
4C
5C %sccs.include.proprietary.f%
6C
7C	@(#)chdtst.f	5.2 (Berkeley) 04/12/91
8C
9
10	integer chdir, unlink, access, ier(8)
11	write(*,*) "moving to /tmp"
12	ier(1) = chdir("/tmp")
13	call system("pwd")
14	open(1, file="scratch")
15	close(1)
16	write(*,*) "linking"
17	ier(2) = link("scratch", "temp")
18	ier(3) = access("scratch", " ")
19	ier(4) = access("temp", " ")
20	call system("ls -il scratch temp")
21	write(*,*) "unlinking"
22	ier(5) = unlink("scratch")
23	ier(6) = unlink("temp")
24	ier(7) = access("scratch", " ")
25	ier(8) = access("temp", " ")
26	call system("ls scratch temp")
27	write(*,*) ier
28	end
29