1. 17 5月, 2017 1 次提交
  2. 16 5月, 2017 1 次提交
    • B
      Re-prefix the paths found by following symlinks · 108a402d
      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.
      108a402d
  3. 03 5月, 2017 1 次提交
    • B
      Fix bug where paths took up twice as much space · ba1c8c65
      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.
      ba1c8c65
  4. 02 5月, 2017 1 次提交
    • B
      Also escape characters in links and headings · 56d4d4c1
      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?
      56d4d4c1
  5. 01 5月, 2017 1 次提交
    • B
      Only highlight escaped characters in file names · eb7e53ef
      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.
      eb7e53ef
  6. 29 4月, 2017 7 次提交
    • B
      Further tests for printing out directory names · 0c69eeca
      Benjamin Sago 提交于
      ., .., and / always seem to cause problems.
      0c69eeca
    • B
      oops · f8b82642
      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!
      f8b82642
    • B
      Tests for the directory path fix · 3d97dffc
      Benjamin Sago 提交于
      3d97dffc
    • B
      Tests for classify and special file types · 456fa287
      Benjamin Sago 提交于
      456fa287
    • B
      Rename file-types tests to file-names-exts · bd5095d0
      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.
      bd5095d0
    • B
      Protect xtests against different default users · ef18f9ca
      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.
      ef18f9ca
    • B
      Protect xtests against the passage of time · b885b34a
      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)
      b885b34a
  7. 30 10月, 2016 6 次提交
    • B
      Basic glob ignoring · 95596297
      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.
      95596297
    • B
      Fix integration test by making it time-independent · bd2a76b4
      Ben S 提交于
      bd2a76b4
    • B
      Properly handle errors when following a symlink · 74358c18
      Ben S 提交于
      Fixes #123. The code assumes that every File that has its link_target() method called would first have been checked to make sure it’s actually a link first. Unfortunately it also assumed that the only thing that can go wrong while following a link is if the file wasn’t a link, meaning it crashes when given a link it doesn’t have permission to follow.
      
      This makes the file_target() method able to return either a file or path for displaying, as before, but also an IO error for when things go wrong.
      74358c18
    • B
      Add some symlink testcases · ba366fc8
      Ben S 提交于
      ba366fc8
    • B
      Write some file-type integration tests · 9589496a
      Ben S 提交于
      9589496a
    • B
      Only engage the view when there are files to show · a7e3456b
      Ben S 提交于
      This changes the way that views are used to display the actual lists of files. It used to pass empty vectors to the view methods, which most of the time would not print anything because there are no files to list — except when there’s a header row which gets printed for no files.
      
      By not calling the view method at all when there’s nothing to print, exa won’t ever print extra things in the view unless it needs to for a file.
      
      This fixes #106 “Don’t print the header if the result set is empty”
      a7e3456b
  8. 08 10月, 2016 1 次提交
    • B
      Replace the testcases script with a Vagrant VM · 54067bf7
      Benjamin Sago 提交于
      See the README section for more details. Basically, with this way, we can store a bunch of existing valid exa outputs, change a VM's environment to match our values, then check that exa still works by comparing outputs.
      54067bf7