1. 29 4月, 2017 1 次提交
    • 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
  2. 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
  3. 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