Add some symlink testcases

This commit is contained in:
Ben S 2016-10-29 19:58:34 +01:00
parent dcc17b1d15
commit ba366fc855
5 changed files with 19 additions and 0 deletions

1
Vagrantfile vendored
View File

@ -110,6 +110,7 @@ Vagrant.configure("2") do |config|
ln -s / "#{test_dir}/links/root"
ln -s /usr "#{test_dir}/links/usr"
ln -s nowhere "#{test_dir}/links/broken"
ln -s /proc/1/root "#{test_dir}/links/forbidden"
EOF
# Awkward passwd testcases.

1
xtests/links Normal file
View File

@ -0,0 +1 @@
broken forbidden root usr

4
xtests/links_1 Normal file
View File

@ -0,0 +1,4 @@
broken -> /home/vagrant/testcases/links/nowhere
forbidden -> /proc/1/root
root -> /
usr -> /usr

7
xtests/links_T Normal file
View File

@ -0,0 +1,7 @@
/home/vagrant/testcases/links
├── broken -> /home/vagrant/testcases/links/nowhere
│ └── <No such file or directory (os error 2)>
├── forbidden -> /proc/1/root
│ └── <Permission denied (os error 13)>
├── root -> /
└── usr -> /usr

View File

@ -46,5 +46,11 @@ $exa $testcases/permissions -lghR 2>&1 | diff -q - $results/permissions || exit
# File types
$exa $testcases/file-types -1 2>&1 | diff -q - $results/file-types || exit 1
# Links
$exa $testcases/links -1 2>&1 | diff -q - $results/links_1 || exit 1
$exa $testcases/links -T 2>&1 | diff -q - $results/links_T || exit 1
COLUMNS=80 $exa $testcases/links 2>&1 | diff -q - $results/links || exit 1
echo "All the tests passed!"