Refresh extended tests

It’s clear that these hadn’t actually been run for a while, and after installing Vagrant again I had to clear out the cobwebs. Necessary changes include:

• Rust is installed differently
• Git-ignored files are now marked
• The help text changed
• Listing a directory symlink shows its contents, requiring a change to the way a directory-symlink test gets run
This commit is contained in:
Benjamin Sago 2019-07-13 20:15:44 +01:00
parent c7b69f09de
commit 7dada93c3e
10 changed files with 25 additions and 17 deletions

12
Vagrantfile vendored
View File

@ -45,8 +45,15 @@ Vagrant.configure(2) do |config|
# This is done as vagrant, not root, because its vagrant
# who actually uses it. Sent to /dev/null because the progress
# bar produces a ton of output.
config.vm.provision :shell, privileged: false, inline:
%[hash rustc &>/dev/null || curl -sSf https://static.rust-lang.org/rustup.sh | sh &> /dev/null]
config.vm.provision :shell, privileged: false, inline: <<-EOF
if hash rustc &>/dev/null; then
echo "Rust is already installed"
else
set -xe
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
EOF
# Use a different target directory on the VM than on the host.
@ -120,6 +127,7 @@ Vagrant.configure(2) do |config|
# Tell bash to execute a bunch of stuff when a session starts
echo "source /vagrant/devtools/dev-bash.sh" > /home/#{developer}/.bash_profile
chown #{developer} /home/#{developer}/.bash_profile
# Disable last login date in sshd
sed -i '/PrintLastLog yes/c\PrintLastLog no' /etc/ssh/sshd_config

View File

@ -6,4 +6,4 @@
/testcases/git2:
drwxrwxr-x - cassowary  1 Jan 12:34 -N deeply
drwxrwxr-x - cassowary  1 Jan 12:34 -N ignoreds
drwxrwxr-x - cassowary  1 Jan 12:34 -- target
drwxrwxr-x - cassowary  1 Jan 12:34 -I target

View File

@ -3,7 +3,7 @@
/testcases/git2/ignoreds:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- music.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
/testcases/git2/target:

View File

@ -1,3 +1,3 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- music.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested

View File

@ -1,3 +1,3 @@
drwxrwxr-x - cassowary  1 Jan 12:34 -N deeply
drwxrwxr-x - cassowary  1 Jan 12:34 -N ignoreds
drwxrwxr-x - cassowary  1 Jan 12:34 -- target
drwxrwxr-x - cassowary  1 Jan 12:34 -I target

View File

@ -1,6 +1,6 @@
drwxrwxr-x - cassowary  1 Jan 12:34 -N deeply
drwxrwxr-x - cassowary  1 Jan 12:34 -N ignoreds
drwxrwxr-x - cassowary  1 Jan 12:34 -- target
drwxrwxr-x - cassowary  1 Jan 12:34 -I target
/testcases/git2/deeply:
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
@ -18,11 +18,11 @@
/testcases/git2/ignoreds:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- music.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
/testcases/git2/ignoreds/nested:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N funky chicken.m4a
/testcases/git2/target:

View File

@ -8,9 +8,9 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- │ └── subfile
drwxrwxr-x - cassowary  1 Jan 12:34 -N ├── ignoreds
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ ├── music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- │ ├── music.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ ├── music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N │ └── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- │ ├── 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ ├── 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 -- └── target
drwxrwxr-x - cassowary  1 Jan 12:34 -I └── target
.rw-rw-r-- 0 cassowary  1 Jan 12:34 --  └── another ignored file

View File

@ -18,9 +18,11 @@ DISPLAY OPTIONS
FILTERING AND SORTING OPTIONS
-a, --all show hidden and 'dot' files
-d, --list-dirs list directories like regular files
-L, --level DEPTH limit the depth of recursion
-r, --reverse reverse the sort order
-s, --sort SORT_FIELD which field to sort by
--group-directories-first list directories before other files
-D, --only-dirs list only directories
-I, --ignore-glob GLOBS glob patterns (pipe-separated) of files to ignore
--git-ignore Ignore files mentioned in '.gitignore'
Valid sort fields: name, Name, extension, Extension, size, type,
@ -34,12 +36,11 @@ LONG VIEW OPTIONS
-h, --header add a header row to each column
-H, --links list each file's number of hard links
-i, --inode list each file's inode number
-L, --level DEPTH limit the depth of recursion
-m, --modified use the modified timestamp field
-S, --blocks show number of file system blocks
-t, --time FIELD which timestamp field to list (modified, accessed, created)
-u, --accessed use the accessed timestamp field
-U, --created use the created timestamp field
--time-style how to format timestamps (default, iso, long-iso, full-iso)
--git list each file's Git status, if tracked
--git list each file's Git status, if tracked or ignored
-@, --extended list each file's extended attributes and sizes

View File

@ -8,12 +8,11 @@ LONG VIEW OPTIONS
-h, --header add a header row to each column
-H, --links list each file's number of hard links
-i, --inode list each file's inode number
-L, --level DEPTH limit the depth of recursion
-m, --modified use the modified timestamp field
-S, --blocks show number of file system blocks
-t, --time FIELD which timestamp field to list (modified, accessed, created)
-u, --accessed use the accessed timestamp field
-U, --created use the created timestamp field
--time-style how to format timestamps (default, iso, long-iso, full-iso)
--git list each file's Git status, if tracked
--git list each file's Git status, if tracked or ignored
-@, --extended list each file's extended attributes and sizes

View File

@ -175,7 +175,7 @@ COLUMNS=80 $exa $testcases/links 2>&1 | diff -q - $results/links ||
# Thereve been bugs where the target file wasnt printed properly when the
# symlink file was specified on the command-line directly.
$exa $testcases/links/* -1 | diff -q - $results/links_1_files || exit 1
$exa $testcases/links/* -1d | diff -q - $results/links_1_files || exit 1
# Colours and terminals