colorls/spec
Claudio Bley 6d8e229cb3 Fix "shows the file in the linked directory" test on Windows
When running on Windows this test failed with:

```
Failures:

  1) ColorLS::Flags symlinked directory with trailing separator shows the file in the linked directory
     Failure/Error: expect { subject }.to output(/yaml_sort_checker.rb/).to_stdout

       expected block to output /yaml_sort_checker.rb/ to stdout, but output "       Supportlink \n"
       Diff:
       @@ -1 +1 @@
       -/yaml_sort_checker.rb/
       +       Supportlink
     # ./spec/color_ls/flags_spec.rb:329:in `block (3 levels) in <top (required)>'
```

This is due to the different handling of paths to a symlink with a trailing
slash / backslash.

`File.lstat(x).directory?` returns

OS      |     x    | value
----------------------------
Windows | symlink\ | false
Windows | symlink  | false
Linux   | symlink/ | true
Linux   | symlink  | false

This could be fixed in colorls by handling a trailing (back)slash specifically,
but I am unsure whether that is the right thing to do on Windows.
2022-04-29 15:58:03 +02:00
..
color_ls Fix "shows the file in the linked directory" test on Windows 2022-04-29 15:58:03 +02:00
fixtures Use ASCII_8BIT for paths and directory entries 2020-04-16 21:58:39 +02:00
support Use rubocop's default include configuration and fix all offenses 2020-12-23 22:32:36 +01:00
color_ls_spec.rb Fix offenses newly reported by rubocop-rspec 2022-02-28 21:37:11 +01:00
spec_helper.rb Use rubocop's default include configuration and fix all offenses 2020-12-23 22:32:36 +01:00