On 10/03/2020, Bram Moolenaar <
Br...@moolenaar.net> wrote:
> Margin Guy wrote:
! :D
> Interesting. You do run the tests with $VIM_POSIX set? That makes Vim
> run as Posix-compatible as it can.
Same result, 13 "failures", so either VIM is already a POSIX hero, or
the differences are so small not to notice. Incidentally, there was
already "POSIXLY_CORRECT". Maybe it should spot that too? Just a
thought.
Actually, vim only reacts to VIM_POSIX to set (it says) different
defaults for "shm" and "cpo", but I see no difference in the setting
of cpo with and without.
> Do you apply some kind of mask to ignore parts
> that don't matter?
Yes, it detects whether you're testing vim in a few places and drops
some false positives, but not everywhere.
> Vim is considered the reference by now.
The most widely diffuse vi, for sure, but I consider
classic/tradditional/heirloom vi as the reference (Bill Joy's
original) for what it "should" do, with those few POSIX modifications
to that, more to make sure that complex scripts like maze and hanoi
work everywhere, not just in the vi that they were written in.
Ti give an idea, here's the list from one test, "Interrupted"
- Control-C's status line should be "Interrupted" instead of a help
message (POSIX llimply says, "the terminal shall be alerted"). If it
matters, maybe it could switch behaviour if *POSIX*
- If you press ^C after one character of a two-character command, vim
does abort the 2-letter command but says nothing. Same thing if
interrupted in insert, replace and command modes, or when running a
recursive "map!" like
:map! x a[Ctrl-V][Enter]xy[Enter]
ax
(PS Congrats on spotting recursive "map"s instead. vi's the only one
that does that!)
Cheers
M