#2592: Fixes unit tests dependent on echo on windows by boyvanduuren · Pull Request #2602 · sharkdp/bat (original) (raw)
@sharkdp Possibly? However, it looks like that error also appears when manually running the other tests where $LESSCLOSE
has a dash as part of its prefix. But those do not have the same issue, right?
A recent comment on my PR for $LESSOPEN
support gave me a helpful lead.
Basically, they said that the files were going through $LESSOPEN
twice, through both bat
and less
. Sure enough, by running the test manually with less
instead of bat, the same LESSOPEN ignored
message appears. Also it may be worth mentioning that the message is not present in the code for bat's $LESSOPEN
implementation.
So for some reason, the $LESSOPEN
environment variable is being passed on to less
, but only when $LESSOPEN
has a dash in it that indicates that stdin is to be preprocessed as well as files.
When I get a chance, I'll try to fix both $LESSOPEN
being passed to less
as well as make bat
more closely match less
's behavior for $LESSOPEN
without a %s
.