Commit Graph

27 Commits

Author SHA1 Message Date
Benjamin Sago
dbd11d3804 Add classify char to symlink targets
Fixes GH-589.
2021-04-12 22:02:30 +01:00
Benjamin Sago
b1c49341c0 Add tests for common command-line errors
Specifically, making sure that they start with "exa", which is something that's been bugging me recently.
2021-04-12 21:55:22 +01:00
Benjamin Sago
550f2d29c2 Add context to all option number parse errors
Fixes GH-839.
2021-04-12 21:42:45 +01:00
Benjamin Sago
31043462af Improve help text for -d flag
Fixes GH-202.
2021-04-11 23:43:36 +01:00
Benjamin Sago
d19d66d57a Fix device IDs test so it works every time
It inadvertently contained the machine build time, which meant it stopped working once the Vagrant machine was rebuild.
2021-04-11 23:34:14 +01:00
Benjamin Sago
051a46c643
Merge pull request #842 from ariasuni/dont-aggregate-git-ignored-status2
Fix deducing git ignored state for files too, not only directories
2021-04-11 20:33:56 +01:00
ariasuni
bfd2644869 Add xtests for new git ignored status deducing logic 2021-04-10 01:42:02 +02:00
Benjamin Sago
f6e66d982d Add tests for device IDs in file size column 2021-04-09 23:59:54 +01:00
Benjamin Sago
e86f2b938b
Merge pull request #837 from ariasuni/fix-month-name-not-translated
Fix month name not following locale when date is in current year
2021-04-09 23:11:28 +01:00
ariasuni
f673e018b5 Add a test checking that date of the current year follows locale 2021-04-09 18:46:10 +02:00
ariasuni
beaf561086 Add xtests for EXA_GRID_ROWS 2021-04-09 17:48:00 +02:00
ariasuni
a0457f9c87 Fix misleading name of some test files 2021-04-09 17:48:00 +02:00
Benjamin Sago
622904d07c Fix integration tests after merged PRs
• The spaces between icons and filenames are now coloured too
• Some icons are different
• File sizes are now more accurate
• New help text, which needed a newline at the end
2021-04-01 10:19:34 +01:00
Benjamin Sago
96e9307b99
Merge pull request #790 from ariasuni/fix-too-many-headers-in-grid-details
Don’t produce extra column sometimes with long grid + header
2021-03-30 14:37:52 +01:00
Benjamin Sago
da171c405f Fix argument sorting in test outputs
See GH-756.
2021-03-29 23:02:35 +01:00
whonore
cfa00bf4b2 Fix new tests 2021-01-15 16:45:54 -05:00
whonore
c8ed69368e Add tests 2021-01-14 10:01:27 -05:00
ariasuni
0f414cf0b9 Don’t produce extra column sometimes with long grid + header
The number of necessary columns was computed by producing a grid in different sizes and see if all columns were used. However, if there was two files and we tried to fit them in a 3-column grid, it would produces three headers and all three columns would be used; when trying a 4-column grid, the two supplementary headers would fill the third column and the fourth would be empty; so 3 columns would be used.

Now, when the grid fits into the terminal and the number of columns is exactly the number of files to display, it returns immediately instead of trying bigger grids.

Fixes GH-436.
2021-01-12 20:18:19 +01:00
ariasuni
73e43c0700 Fix Vagrantfile and extended tests 2021-01-11 18:55:06 +01:00
Benjamin Sago
51be9f4c43 Introduce EXA_ICON_SPACING environment variable
This commit remove the extra space that was added between icons and file names in commit 128fadd, and adds an option to put them back.

Re-fixes GH-619 and fixes GH-541.
2020-10-24 19:41:07 +01:00
Benjamin Sago
c83359225b Fix xtests for previous two commits 2020-10-24 18:43:59 +01:00
Benjamin Sago
f1e3e7c7ff Move icon generation into file name module
This commit makes adding icons to file names something that the file name renderer does, rather than something that each individual view does. This is now possible thanks to the previous commit a1869f2, which moved the option to do this into the same module. The repeated code has been removed.

It happens to fix a bug where the width of each column was being incorrectly calculated for the grid-details view, making lines slightly too long for the terminal because the icon wasn't being taken into account.
2020-10-24 18:03:36 +01:00
Benjamin Sago
800c73ff24 Add icons xtests 2020-10-23 23:49:10 +01:00
Benjamin Sago
06c899cac0 More git-ignore xtests
The new tests make sure that the git-ignored files are skipped in every view.
2020-10-17 21:59:15 +01:00
Benjamin Sago
d8b21a33b5 More date-related xtests
• Displaying accessed and modified dates
• Displaying dates in the distant past and far future (#557)
2020-10-17 21:26:24 +01:00
Benjamin Sago
ef7bb43dbb Fix xtests bug where git3 file date kept changing 2020-10-17 21:25:49 +01:00
Benjamin Sago
61c5df7c11 Use Specsheet for the extended tests
This commit changes the way the extended test suite is run.

Previously, there was a folder full of outputs, and a script that ran exa repeatedly to check the outputs match. This script was hacked-together, with many problems:

• It stops at the first failure, so if one test fails, you have no idea how many actually failed.
• It also didn't actually show you the diff if one was different, it just checked it.
• It combined stdout and stderr, and didn't test the exit status of exa.
• All the output file names were just whatever I felt like calling the file at the time.
• There is no way to only run a few of the tests — you have to run the whole thing each time.
• There's no feel-good overall view where you see how many tests are passing.

I started writing Specsheet to solve this problem (amongst other problems), and now, three and a half years later, it's finally ready for prime time.

The tests are now defined as data rather than as a script. The outputs have a consistent naming convention (directory_flags.ansitxt), and they check stdout, stderr, and exit status separately. Specsheet also lets simple outputs (empty, non-empty, or one-line error messages) can be written inline rather than needing to be in files.

So even though this pretty much runs the same tests as the run.sh script did, the tests are now more organised, making it easy to see where tests are missing and functionality is not being tested.
2020-10-17 21:12:18 +01:00