mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-29 07:03:54 +00:00
Write some file-type integration tests
This commit is contained in:
parent
a7e3456b0d
commit
9589496aac
39
Vagrantfile
vendored
39
Vagrantfile
vendored
@ -63,6 +63,45 @@ Vagrant.configure("2") do |config|
|
||||
touch -t #{some_date} "#{test_dir}/files/"*
|
||||
EOF
|
||||
|
||||
# File name extension testcases.
|
||||
config.vm.provision :shell, privileged: false, inline: <<-EOF
|
||||
set -xe
|
||||
mkdir "#{test_dir}/file-types"
|
||||
|
||||
touch "#{test_dir}/file-types/Makefile"
|
||||
|
||||
touch "#{test_dir}/file-types/image.png"
|
||||
touch "#{test_dir}/file-types/image.svg"
|
||||
|
||||
touch "#{test_dir}/file-types/video.avi"
|
||||
touch "#{test_dir}/file-types/video.wmv"
|
||||
|
||||
touch "#{test_dir}/file-types/music.mp3"
|
||||
touch "#{test_dir}/file-types/music.ogg"
|
||||
|
||||
touch "#{test_dir}/file-types/lossless.flac"
|
||||
touch "#{test_dir}/file-types/lossless.wav"
|
||||
|
||||
touch "#{test_dir}/file-types/crypto.asc"
|
||||
touch "#{test_dir}/file-types/crypto.signature"
|
||||
|
||||
touch "#{test_dir}/file-types/document.pdf"
|
||||
touch "#{test_dir}/file-types/document.xlsx"
|
||||
|
||||
touch "#{test_dir}/file-types/compressed.zip"
|
||||
touch "#{test_dir}/file-types/compressed.tar.gz"
|
||||
|
||||
touch "#{test_dir}/file-types/backup~"
|
||||
touch "#{test_dir}/file-types/#SAVEFILE#"
|
||||
touch "#{test_dir}/file-types/file.tmp"
|
||||
|
||||
touch "#{test_dir}/file-types/compiled.class"
|
||||
touch "#{test_dir}/file-types/compiled.o"
|
||||
touch "#{test_dir}/file-types/compiled.js"
|
||||
touch "#{test_dir}/file-types/compiled.coffee"
|
||||
|
||||
EOF
|
||||
|
||||
# Awkward symlink testcases.
|
||||
config.vm.provision :shell, privileged: false, inline: <<-EOF
|
||||
set -xe
|
||||
|
22
xtests/file-types
Normal file
22
xtests/file-types
Normal file
@ -0,0 +1,22 @@
|
||||
[38;5;244m#SAVEFILE#[0m
|
||||
[1;4;33mMakefile[0m
|
||||
[38;5;244mbackup~[0m
|
||||
[38;5;137mcompiled.class[0m
|
||||
compiled.coffee
|
||||
[38;5;137mcompiled.js[0m
|
||||
[38;5;137mcompiled.o[0m
|
||||
[31mcompressed.tar.gz[0m
|
||||
[31mcompressed.zip[0m
|
||||
[38;5;109mcrypto.asc[0m
|
||||
[38;5;109mcrypto.signature[0m
|
||||
[38;5;105mdocument.pdf[0m
|
||||
[38;5;105mdocument.xlsx[0m
|
||||
[38;5;244mfile.tmp[0m
|
||||
[38;5;133mimage.png[0m
|
||||
[38;5;133mimage.svg[0m
|
||||
[38;5;93mlossless.flac[0m
|
||||
[38;5;93mlossless.wav[0m
|
||||
[38;5;92mmusic.mp3[0m
|
||||
[38;5;92mmusic.ogg[0m
|
||||
[38;5;135mvideo.avi[0m
|
||||
[38;5;135mvideo.wmv[0m
|
@ -43,5 +43,8 @@ $exa $testcases/passwd -lgh | diff -q - $results/passwd || exit 1
|
||||
# Permissions
|
||||
$exa $testcases/permissions -lghR 2>&1 | diff -q - $results/permissions || exit 1
|
||||
|
||||
# File types
|
||||
$exa $testcases/file-types -1 2>&1 | diff -q - $results/file-types || exit 1
|
||||
|
||||
|
||||
echo "All the tests passed!"
|
||||
|
Loading…
Reference in New Issue
Block a user