aboutsummaryrefslogtreecommitdiff
path: root/scripts/test/link.test
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2014-06-01 17:47:19 -0500
committerIsaac Dunham <ibid.ag@gmail.com>2014-06-01 17:47:19 -0500
commit8b3b9aa1bdbd3a1d721873e4359f650ff52427e5 (patch)
treeb85237e96a5f52bc75c3b5c9366b7ec25773d7ed /scripts/test/link.test
parent670626ab009f1d369be94def71f48be2e88f0106 (diff)
downloadtoybox-8b3b9aa1bdbd3a1d721873e4359f650ff52427e5.tar.gz
The tests for link and du are attached.
Diffstat (limited to 'scripts/test/link.test')
-rwxr-xr-xscripts/test/link.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/test/link.test b/scripts/test/link.test
new file mode 100755
index 00000000..3bfdc1f1
--- /dev/null
+++ b/scripts/test/link.test
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+[ -e testing.sh ] && . testing.sh
+
+echo "" >foo
+testing "link has same inode" "link foo bar && stat -c '%DI%i bar'" "stat -c '%DI%i' foo" "" ""
+testing "link fails on non-existent file" "link foo/foo baz || echo GOOD" "GOOD\n" "" ""
+rm -f foo bar