summaryrefslogtreecommitdiff
path: root/tests/ln_tests.mk
diff options
context:
space:
mode:
authorErik Andersen2000-02-07 05:29:42 +0000
committerErik Andersen2000-02-07 05:29:42 +0000
commitfac10d7c59f7db0facd5fb94de273310b9ec86e6 (patch)
treedccf8f905fc5807239883da9fca6597037d487fc /tests/ln_tests.mk
parent50bc101b7d6e847a9a0621ca3eb28c7117d095e5 (diff)
downloadbusybox-fac10d7c59f7db0facd5fb94de273310b9ec86e6.zip
busybox-fac10d7c59f7db0facd5fb94de273310b9ec86e6.tar.gz
A few minor updates. ;-)
Seriously though, read the Changelog for busybox 0.42, which this is about to become... -Erik
Diffstat (limited to 'tests/ln_tests.mk')
-rw-r--r--tests/ln_tests.mk66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/ln_tests.mk b/tests/ln_tests.mk
new file mode 100644
index 0000000..5925edd
--- /dev/null
+++ b/tests/ln_tests.mk
@@ -0,0 +1,66 @@
+
+# GNU `ln'
+GLN = /bin/ln
+# BusyBox `ln'
+BLN = $(shell pwd)/ln
+
+.PHONY: ln_clean
+ln_clean:
+ rm -rf ln_tests ln_*.{gnu,bb} ln
+
+.PHONY: ln_tests
+ln_tests: ln_clean ln
+ @echo;
+ @echo "No output from diff means busybox ln is functioning properly.";
+
+ @echo;
+ ${BLN} || true;
+
+ @echo;
+ mkdir ln_tests;
+
+ @echo;
+ cd ln_tests; \
+ echo A file > afile; \
+ ls -l afile > ../ln_afile_newname.gnu; \
+ ${GLN} afile newname; \
+ ls -l afile newname >> ../ln_afile_newname.gnu;
+
+ @echo;
+ rm -f ln_tests/{afile,newname};
+
+ @echo;
+ cd ln_tests; \
+ echo A file > afile; \
+ ls -l afile > ../ln_afile_newname.bb; \
+ ${BLN} afile newname; \
+ ls -l afile newname >> ../ln_afile_newname.bb;
+
+ @echo;
+ diff -u ln_afile_newname.gnu ln_afile_newname.bb
+
+ @echo;
+ rm -f ln_tests/{afile,newname};
+
+ @echo;
+ cd ln_tests; \
+ echo A file > afile; \
+ ls -l afile > ../ln_s_afile_newname.gnu; \
+ ${GLN} -s afile newname; \
+ ls -l afile newname >> ../ln_s_afile_newname.gnu;
+
+ @echo;
+ rm -f ln_tests/{afile,newname};
+
+ @echo;
+ cd ln_tests; \
+ echo A file > afile; \
+ ls -l afile > ../ln_s_afile_newname.bb; \
+ ${BLN} -s afile newname; \
+ ls -l afile newname >> ../ln_s_afile_newname.bb;
+
+ @echo;
+ diff -u ln_s_afile_newname.gnu ln_s_afile_newname.bb
+
+ @echo;
+ rm -f ln_tests/{afile,newname};