mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-01-23 13:58:23 +00:00
Add some symlink testcases
This commit is contained in:
parent
dcc17b1d15
commit
ba366fc855
1
Vagrantfile
vendored
1
Vagrantfile
vendored
@ -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
1
xtests/links
Normal file
@ -0,0 +1 @@
|
||||
[36mbroken[0m [36mforbidden[0m [36mroot[0m [36musr[0m
|
4
xtests/links_1
Normal file
4
xtests/links_1
Normal file
@ -0,0 +1,4 @@
|
||||
[36mbroken[0m [31m->[0m [4;31m/home/vagrant/testcases/links/nowhere[0m
|
||||
[36mforbidden[0m [31m->[0m [4;31m/proc/1/root[0m
|
||||
[36mroot[0m [38;5;244m->[0m [36m/[0m
|
||||
[36musr[0m [38;5;244m->[0m [36m/[1;34musr[0m
|
7
xtests/links_T
Normal file
7
xtests/links_T
Normal file
@ -0,0 +1,7 @@
|
||||
[36m/home/vagrant/testcases/[1;34mlinks[0m
|
||||
[38;5;244m├──[0m [36mbroken[0m [31m->[0m [4;31m/home/vagrant/testcases/links/nowhere[0m
|
||||
[38;5;244m│ └──[0m [31m<No such file or directory (os error 2)>[0m
|
||||
[38;5;244m├──[0m [36mforbidden[0m [31m->[0m [4;31m/proc/1/root[0m
|
||||
[38;5;244m│ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[38;5;244m├──[0m [36mroot[0m [38;5;244m->[0m [36m/[0m
|
||||
[38;5;244m└──[0m [36musr[0m [38;5;244m->[0m [36m/[1;34musr[0m
|
@ -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!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user