mirror of
https://github.com/athityakumar/colorls.git
synced 2024-09-12 05:31:14 +02:00
6d8e229cb3
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. |
||
---|---|---|
.. | ||
color_ls | ||
fixtures | ||
support | ||
color_ls_spec.rb | ||
spec_helper.rb |