blob: 3110f8199977b9649de23999eb0b22deabe725ff [file] [log] [blame]
Erik Andersen029011b2000-03-04 21:19:32 +00001# ln_tests.mk - Set of tests for busybox ln
2# -------------
3# Copyright (C) 2000 Karl M. Hegbloom <karlheg@debian.org> GPL
4#
Erik Andersenfac10d72000-02-07 05:29:42 +00005
6# GNU `ln'
7GLN = /bin/ln
8# BusyBox `ln'
9BLN = $(shell pwd)/ln
10
Erik Andersen029011b2000-03-04 21:19:32 +000011all:: ln_tests
12clean:: ln_clean
13
Erik Andersenfac10d72000-02-07 05:29:42 +000014ln_clean:
15 rm -rf ln_tests ln_*.{gnu,bb} ln
16
Erik Andersenfac10d72000-02-07 05:29:42 +000017ln_tests: ln_clean ln
18 @echo;
19 @echo "No output from diff means busybox ln is functioning properly.";
20
21 @echo;
22 ${BLN} || true;
23
24 @echo;
25 mkdir ln_tests;
26
27 @echo;
28 cd ln_tests; \
29 echo A file > afile; \
30 ls -l afile > ../ln_afile_newname.gnu; \
31 ${GLN} afile newname; \
32 ls -l afile newname >> ../ln_afile_newname.gnu;
33
34 @echo;
35 rm -f ln_tests/{afile,newname};
36
37 @echo;
38 cd ln_tests; \
39 echo A file > afile; \
40 ls -l afile > ../ln_afile_newname.bb; \
41 ${BLN} afile newname; \
42 ls -l afile newname >> ../ln_afile_newname.bb;
43
44 @echo;
45 diff -u ln_afile_newname.gnu ln_afile_newname.bb
46
47 @echo;
48 rm -f ln_tests/{afile,newname};
49
50 @echo;
51 cd ln_tests; \
52 echo A file > afile; \
53 ls -l afile > ../ln_s_afile_newname.gnu; \
54 ${GLN} -s afile newname; \
55 ls -l afile newname >> ../ln_s_afile_newname.gnu;
56
57 @echo;
58 rm -f ln_tests/{afile,newname};
59
60 @echo;
61 cd ln_tests; \
62 echo A file > afile; \
63 ls -l afile > ../ln_s_afile_newname.bb; \
64 ${BLN} -s afile newname; \
65 ls -l afile newname >> ../ln_s_afile_newname.bb;
66
67 @echo;
68 diff -u ln_s_afile_newname.gnu ln_s_afile_newname.bb
69
70 @echo;
71 rm -f ln_tests/{afile,newname};