Commit Graph

62 Commits

Author SHA1 Message Date
Benjamin Sago
eb1188c2c8 Give the testing VM commands and help text 2017-10-01 12:37:35 +02:00
Benjamin Sago
a739299583 Add a release-checking script 2017-10-01 12:28:23 +02:00
Benjamin Sago
a4bd8f7f17 Move the welcoming text to their own files too
Again, it was hard to read and edit this text when it was in a string inside an echo command inside a bash script inside a heredoc inside a Ruby script wrapped in a mystery. It also gives me space to write some actual comments.
2017-10-01 09:49:45 +02:00
Benjamin Sago
173e9b2345 Move the packaging script into its own file
Having it all echo-ed into the file like that made it hard to read *and* hard to maintain. My initial aversion to it was that I didn’t want there to be an executable script in the main repository that only worked when you were in the VM, because people would just run it anyway. But this can be avoided by leaving it non-executable, and having a command in the VM that runs it instead.
2017-10-01 09:48:20 +02:00
Benjamin Sago
02403c7cc5 Also include a ‘fresh’ VM for staticness testing
This fresh VM deliberately contains no dependencies and installs nothing, so it can be used to check that the uploaded binary still runs.
2017-09-30 15:23:55 +02:00
Benjamin Sago
29bb3645f4 Don’t include the path in the zipped binary
The ‘package-exa’ script’s zip contained /vagrant/exa-linux-x86_64 instead of just exa-linux-x86_64, and I never noticed.

https://stackoverflow.com/a/9710181/3484614 told me what to do.
2017-09-30 15:20:20 +02:00
Benjamin Sago
2b099d8ba0 Fix up tests to have nested ignored files 2017-09-30 09:17:28 +02:00
Benjamin Sago
7339b753fb vagrant: Update apt before installing
I updated my Vagrant box and destroyed and rebuilt it, and for some reason, it didn’t know about ‘fish’. Updating beforehand fixes it.
2017-09-30 09:17:28 +02:00
Benjamin Sago
cfc05eef00 Add test for nested Git repository
I don’t know how this should work, but let’s at least record the current behaviour in case it changes
2017-08-28 18:24:20 +01:00
Benjamin Sago
55aaecb74d Improve Git test coverage
- Two different repositories being queried at once
- The same one being queried twice, at different depths
- Tests for --tree and --recurse that should break in the future when that’s implemented
- Also just more tests in general
2017-08-28 15:10:29 +01:00
Benjamin Sago
b13b37ed29 Add exa_colors support to the Vagrant VM 2017-08-26 23:44:29 +01:00
Benjamin Sago
4cab5b6b94 Don’t re-clone the git2-rs repo
Apparently trying to clone a repository onto an already-cloned clone just errors
2017-08-26 15:13:19 +01:00
Benjamin Sago
44cee6b60c Add unnecessary hacker theme 2017-08-26 14:05:08 +01:00
Benjamin Sago
3405db1f4b Use my patched verson of git2-rs
Now, the Vagrant VM uses my patched version of git2-rs, which has a modified build.rs file in libgit2-sys, which blocks libhttp_parser from being linked. As you can see by the comment, I’m not a fan of the fix, but at least it works, right?

See #194, and also #255.
2017-08-20 20:04:59 +01:00
Benjamin Sago
414b347ae5 Formalise exa-packaging script
Every time I had to build exa, I copied the files manually and checked to make sure they all had the same name. There’s now a script that does all that stuff for me, so I don’t need to remember to do it anymore.

It also does some things that weren’t being done before, including stripping the binary and listing its linked dependencies to we can tell if something like libhttp_parser has slipped in there (see #194)
2017-08-20 18:22:08 +01:00
Benjamin Sago
d716bb72c9 Say where the target directory is too 2017-08-19 23:36:25 +01:00
Benjamin Sago
69fbf8b6c0 Quieten the test output 2017-08-19 23:25:51 +01:00
Benjamin Sago
d980f3ef85 Make the prompt bold 2017-08-19 22:37:52 +01:00
Benjamin Sago
c2779403a7 And again for LS_COLORS 2017-08-19 21:58:59 +01:00
Benjamin Sago
b2cbb909e1 Do the same for strict mode 2017-08-19 21:20:14 +01:00
Benjamin Sago
886398eda9 Make debug mode switch-on-and-offable 2017-08-19 21:13:44 +01:00
Benjamin Sago
6eb3face43 Include a fancy custom prompt 2017-08-19 20:23:37 +01:00
Benjamin Sago
1c2e34f649 Add some more helper scripts
Also, add some welcoming text when the user logs in over SSH.
2017-08-19 19:47:39 +01:00
Benjamin Sago
9e4ac8cae9 Add global aliases for cargo and xtests 2017-08-19 16:03:08 +01:00
Christopher Vittal
1bce51c9c8 Add extra types to compressed filetype filter.
This adds a few more common compressed filetypes to the is_compressed
fuction. Notably, xz, and two common package file formats, deb and rpm.
2017-08-07 00:57:29 -04:00
Benjamin Sago
115315a03c Test the locale month name width stuff
This commit modifies a specific file timestamp so we test both July (which is 5 characters in French) and December (which is 4 characters in Japanese). It’s also kind of a test for locales as well.
2017-08-06 22:25:00 +01:00
Benjamin Sago
2d1f462bfa Switch to the new options parser
This commit removes the dependency on the ‘getopts’ crate entirely, and re-writes all its uses to use the new options parser instead.

As expected there are casualties galore:

- We now need to collect the options into a vector at the start, so we can use references to them, knowing they’ll be stored *somewhere*.
- Because OsString isn’t Display, its Debug impl gets used instead. (This is hopefully temporary)
- Options that take values (such as ‘sort’ or ‘time-style’) now parse those values with ‘to_string_lossy’. The ‘lossy’ part means “I’m at a loss for what to do here”
- Error messages got a lot worse, but “--tree --all --all” is now a special case of error rather than just another Misfire::Useless.
- Some tests had to be re-written to deal with the fact that the parser works with references.
- ParseError loses its lifetime and owns its contents, to avoid having to attach <'a> to Misfire.
- The parser now takes an iterator instead of a slice.
- OsStrings can’t be ‘match’ patterns, so the code devolves to using long Eq chains instead.
- Make a change to the xtest that assumed an input argument with invalid UTF-8 in was always an error to stderr, when that now in fact works!
- Fix a bug in Vagrant where ‘exa’ and ‘rexa’ didn’t properly escape filenames with spaces in.
2017-07-26 17:48:18 +01:00
Benjamin Sago
5bdf6304bb Fix bug where accessed times were wrong!
It used the mtime, rather than the atime. Copy and paste error. Whoops!
2017-07-05 22:07:03 +01:00
Benjamin Sago
882ac489ce Much more thorough xattr testing
It now tests a lot more combinations of xattrs on files, as well as xattrs and files and errors as the children of directories.

The recent code changes have touched the part where directories’ xattrs and children are displayed at the same tree level, and there weren’t enough tests for this.
2017-07-04 17:42:16 +01:00
Benjamin Sago
5a2ffd3fbe Generate files with certain timestamps
This is going to be used to test time formatting.

Casualty here is that the “have you not ran the provisioning script in a year?” checker complained about there being files more than a year old, so that now has to ignore the times directory.
2017-07-03 08:46:38 +01:00
Benjamin Sago
9d74091195 Upcase some of the extension testcases
These are going to be used for sort testing. Unfortunately, three existing tests that were using the lowercase versions had to be changed.
2017-06-29 13:57:31 +01:00
Benjamin Sago
dd8bff083f Override the names of . and ..
There was a problem when displaying . and .. in directory listings: their names would normalise to actual names! So instead of literally seeing `.`, you’d see the current directory’s name, inserted in sort order into the list of results. Obviously this is not what we want.

In unrelated news, putting `.` and `..` into the list of paths read from a directory just takes up more heap space for something that’s basically constant.

We can solve both these problems at once by moving the DotFilter to the files iterator in Dir, rather than at the Dir’s creation. Having the iterator know whether it should display `.` and `..` means it can emit those files first, and because it knows what those files really represent, it can override their file names to actually be those sequences of dots.

This is not a perfect solution: the main casualty is that a File can now be constructed with a name, some metadata, both, or neither. This is currently handled with a bunch of Options, and returns IOResult even without doing any IO operations.

But at least all the tests pass!
2017-06-28 18:41:31 +01:00
Benjamin Sago
c4447e35b6 xtests for higher order bits
Finally, re-do the permissions extended tests to include the setuid, setgid, and sticky bits, and rename the last two existing ones to match the others (files with the same names as their permissions).
2017-05-30 15:32:11 +01:00
Benjamin Sago
e10c4b3eb9 Add xtests for existing Git implementation 2017-05-17 20:35:05 +01:00
Benjamin Sago
d2b1499fb1 Add thing for installing cargo-kcov 2017-05-07 20:25:53 +01:00
Benjamin Sago
ad85f3d023 Bash completions 2017-05-06 21:56:40 +01:00
Benjamin Sago
956c5b7181 Rename dexa to just exa 2017-05-06 20:52:43 +01:00
Benjamin Sago
daaadece97 Remember to pass arguments in dexa and rexa 2017-05-06 20:50:47 +01:00
Benjamin Sago
cffbd8d6b1 Zsh completions 2017-05-06 20:50:24 +01:00
Benjamin Sago
3c7800c124 Fish completions 2017-05-06 20:34:59 +01:00
Benjamin Sago
32ab6a5823 Convert the aliases to actual files 2017-05-06 19:38:34 +01:00
Benjamin Sago
b5bd76b548 Give everybody dexa and rexa aliases
Also, make it so the same line doesn’t get added to the .bashrc every time provisioning is run.
2017-05-06 19:14:25 +01:00
Benjamin Sago
558004b6ac Remove openssl build-time dependencies 2017-05-06 14:06:27 +01:00
Benjamin Sago
f51f5fe202 Also escape characters in broken symlinks 2017-05-02 08:46:43 +01:00
Benjamin Sago
56d4d4c156 Also escape characters in links and headings
Doing this meant that the escaping functionality got used in three places, so it was extracted into a generalised function in its own module.

This is slighly slower for the case where escaped characters are displayed in the same colour as the displayable characters, which happens when listing a directory’s name when recursing. Optimise this, yeah?
2017-05-01 21:54:53 +01:00
Benjamin Sago
56f859dd36 Add some awkward file name testcases 2017-05-01 12:22:57 +01:00
Benjamin Sago
6b008a6177 Add tests for relative symlinks 2017-04-30 11:58:29 +01:00
Benjamin Sago
58b6d3e50c Make the Vagrant provisioning process quieter 2017-04-30 11:06:52 +01:00
Kevin Ballard
e73eb2dc1a Fix Vagrantfile 2017-04-29 14:53:47 -07:00
Benjamin Sago
456fa287d2 Tests for classify and special file types 2017-04-29 09:21:31 +01:00