Skip to content

Commit 7dada93

Browse files
committed
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
1 parent c7b69f0 commit 7dada93

10 files changed

+25
-17
lines changed

Vagrantfile

+10-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ Vagrant.configure(2) do |config|
4545
# This is done as vagrant, not root, because it’s vagrant
4646
# who actually uses it. Sent to /dev/null because the progress
4747
# bar produces a ton of output.
48-
config.vm.provision :shell, privileged: false, inline:
49-
%[hash rustc &>/dev/null || curl -sSf https://static.rust-lang.org/rustup.sh | sh &> /dev/null]
48+
config.vm.provision :shell, privileged: false, inline: <<-EOF
49+
50+
if hash rustc &>/dev/null; then
51+
echo "Rust is already installed"
52+
else
53+
set -xe
54+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
55+
fi
56+
EOF
5057

5158

5259
# Use a different ‘target’ directory on the VM than on the host.
@@ -120,6 +127,7 @@ Vagrant.configure(2) do |config|
120127
121128
# Tell bash to execute a bunch of stuff when a session starts
122129
echo "source /vagrant/devtools/dev-bash.sh" > /home/#{developer}/.bash_profile
130+
chown #{developer} /home/#{developer}/.bash_profile
123131
124132
# Disable last login date in sshd
125133
sed -i '/PrintLastLog yes/c\PrintLastLog no' /etc/ssh/sshd_config

xtests/git_12

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
/testcases/git2:
77
drwxrwxr-x - cassowary  1 Jan 12:34 -N deeply
88
drwxrwxr-x - cassowary  1 Jan 12:34 -N ignoreds
9-
drwxrwxr-x - cassowary  1 Jan 12:34 -- target
9+
drwxrwxr-x - cassowary  1 Jan 12:34 -I target

xtests/git_2_all

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/testcases/git2/ignoreds:
55
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
6-
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- music.mp3
6+
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
77
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
88

99
/testcases/git2/target:

xtests/git_2_ignoreds

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
2-
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- music.mp3
2+
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
33
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested

xtests/git_2_long

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
drwxrwxr-x - cassowary  1 Jan 12:34 -N deeply
22
drwxrwxr-x - cassowary  1 Jan 12:34 -N ignoreds
3-
drwxrwxr-x - cassowary  1 Jan 12:34 -- target
3+
drwxrwxr-x - cassowary  1 Jan 12:34 -I target

xtests/git_2_recurse

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
drwxrwxr-x - cassowary  1 Jan 12:34 -N deeply
22
drwxrwxr-x - cassowary  1 Jan 12:34 -N ignoreds
3-
drwxrwxr-x - cassowary  1 Jan 12:34 -- target
3+
drwxrwxr-x - cassowary  1 Jan 12:34 -I target
44

55
/testcases/git2/deeply:
66
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
@@ -18,11 +18,11 @@
1818

1919
/testcases/git2/ignoreds:
2020
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
21-
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- music.mp3
21+
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
2222
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
2323

2424
/testcases/git2/ignoreds/nested:
25-
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- 70s grove.mp3
25+
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I 70s grove.mp3
2626
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N funky chicken.m4a
2727

2828
/testcases/git2/target:

xtests/git_2_tree

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- │ └── subfile
99
drwxrwxr-x - cassowary  1 Jan 12:34 -N ├── ignoreds
1010
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ ├── music.m4a
11-
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- │ ├── music.mp3
11+
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ ├── music.mp3
1212
drwxrwxr-x - cassowary  1 Jan 12:34 -N │ └── nested
13-
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- │ ├── 70s grove.mp3
13+
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ ├── 70s grove.mp3
1414
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ └── funky chicken.m4a
15-
drwxrwxr-x - cassowary  1 Jan 12:34 -- └── target
15+
drwxrwxr-x - cassowary  1 Jan 12:34 -I └── target
1616
.rw-rw-r-- 0 cassowary  1 Jan 12:34 --  └── another ignored file

xtests/help

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

xtests/help_long

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

xtests/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ COLUMNS=80 $exa $testcases/links 2>&1 | diff -q - $results/links ||
175175

176176
# There’ve been bugs where the target file wasn’t printed properly when the
177177
# symlink file was specified on the command-line directly.
178-
$exa $testcases/links/* -1 | diff -q - $results/links_1_files || exit 1
178+
$exa $testcases/links/* -1d | diff -q - $results/links_1_files || exit 1
179179

180180

181181
# Colours and terminals

0 commit comments

Comments
 (0)