- 20 8月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
The Debug impl was being used instead of the Display one. Also, remove the full stops from the ends of all the error messages because I’ve decided it looks weird.
-
- 19 8月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
-
- 11 8月, 2017 3 次提交
-
-
由 Benjamin Sago 提交于
exa now ignores errors when checking for extended attributes when the user didn’t explicitly demand that they be checked. If a file does have xattrs, it’ll still display the @ in the permissions column; errors will now just cause the @ to be hidden instead. This changed a lot of the xtests, which were displaying the error message in a few situations. Those tests have gained @-suffixed companions so the actual error messages can still be tested. Fixes #178 (finally)
-
由 Benjamin Sago 提交于
The annoying part is trying to format!() an OsStr.
-
由 Benjamin Sago 提交于
It’s a good test to be able to switch strict mode on in run.sh and not have it break anything! Now, the EXA_STRICT environment variable will toggle it on. We can even switch it off and see that it doesn’t error.
-
- 07 8月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
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.
-
- 06 8月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
This restriction was originally only there because a standalone --tree wasn’t a thing. Now it’s there, there’s no reason to forbid the combination.
-
- 27 7月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
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.
-
- 06 7月, 2017 4 次提交
-
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
This has to do its own number formatting because *somebody* didn’t add “print the current month number” functionality to rust-datetime!
-
由 Benjamin Sago 提交于
It used the mtime, rather than the atime. Copy and paste error. Whoops!
-
- 05 7月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
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.
-
- 03 7月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
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.
-
- 29 6月, 2017 5 次提交
-
-
由 Benjamin Sago 提交于
This isn’t perfect, as a file’s type isn’t cached, so it gets recomputed for every comparison in the sort! We can’t go off the file’s `st_mode` flag because it’s not guaranteed to be in any order between systems.
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
These are going to be used for sort testing. Unfortunately, three existing tests that were using the lowercase versions had to be changed.
-
由 Benjamin Sago 提交于
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!
-
- 25 6月, 2017 2 次提交
-
-
由 Benjamin Sago 提交于
exa assumed that the COLUMNS environment variable being present always meant that the output was to a terminal, so it should use colours. But because this variable can be overridden, colours were being incorrectly set! The ‘fix’ is to stop trying to be clever while only calculating the terminal width once, and instead just stick it in a lazy_static so it’s usable everywhere.
-
由 Benjamin Sago 提交于
-
- 24 6月, 2017 3 次提交
-
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
- 19 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
By parsing OsStrings rather than Strings, it’s the getopts crate that’s doing the UTF-8 checking rather than us, so if one of them isn’t valid, it’ll just fail to parse rather than crash exa. Also, save a few allocations here and there.
-
- 18 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
-
- 17 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
-
- 16 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
Fixes #134, a bug that showed symlinks incorrectly as broken, but only when the file was listed directly on the command-line *and* the file was in a different directory to the one exa was being run in. I’m not sure why the old code used `String::new()`, but it doesn’t seem to affect anything.
-
- 03 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
For some reason, the code that calculated the width of a cell with a path in counted the width of the path twice: once from the ANSIStrings containing it, and once more added on afterwards. This meant that the grid view thought that columns were wider than they really were, meaning fewer could be fit into a grid.
-
- 02 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
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?
-
- 01 5月, 2017 1 次提交
-
-
由 Benjamin Sago 提交于
Rather than the *entire* file name. The current method is extremely inefficient, but having control characters in file names is also extremely uncommon; it’s something that should be fixed, only eventually.
-
- 29 4月, 2017 7 次提交
-
-
由 Benjamin Sago 提交于
., .., and / always seem to cause problems.
-
由 Benjamin Sago 提交于
I think I took this off to see how the output was different. Which means there should really be a better way to check how the output is different, other than running the command and looking!
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
This name more accurately reflects which code is being tested (things like .png and Makefile, rather than pipes and sockets), freeing up file-types for *actual* file types to be tested.
-
由 Benjamin Sago 提交于
The Vagrant tests assumed that there’d be a user called “vagrant” that would run the tests and create the files by default. Files would be owned by vagrant:vagrant by default, and this worked, until it came time to change that username. The naïve method was a search-and-replace, but this caused problems when the new user’s name wasn’t exactly the same length as the previous one. So to fix this, we now have our own user, named after the first animal I thought of, that makes the files’ owners and groups independent of the default user of whichever VM image the xtests are running on. Another place where it was hard-coded was the home directory, which was “/home/vagrant”, where the awkward testcases live. That last one has been changed to just “/testcases”, which has no mention of the user in it.
-
由 Benjamin Sago 提交于
There was a problem with the Vagrant tests where the year 2016 was hard-coded in as the modified date. This had to be done to make the --long tests use the correct date format, which varies depending on whether the timestamp is in the current year. Unfortunately, time progresses [citation needed], and what was once 2016 is now 2017, so the date format changed and the tests broke. Because the Vagrantfile is just a Ruby script, we can look up the current year at runtime and use that instead. There’s also a check added to the test runner that makes sure none of the files are more than 365 days old, because if any are, then it’s time to update the timestamps (or it’s the last day of a leap year)
-
- 30 10月, 2016 2 次提交
-
-
由 Ben S 提交于
See #97 and recently #130 too. This allows the user to pass in options such as "--ignore '*.pyc'" to not list any files ending in '.pyc' in the output. It uses the Rust glob crate and currently does a simple split on pipe, without any escaping, so it’s not really *complete*, but is at least something.
-
由 Ben S 提交于
-