Hi

I just got a macOS M1 laptop for work. First thing I did, was
was of course to compile the latest Vim from git (8.2.4815).
I noticed a test failure:

$ cd vim/src/testdir
$ make  test_environ
rm -f test_environ.res test.log messages
VIMRUNTIME=../../runtime  ../vim -f  -u unix.vim -U NONE --noplugin
--not-a-term -S runtest.vim test_environ.vim --cmd 'au SwapExists *
let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing
Test_/{match($0, "Executing Test_[^\\)]*\\)"); print substr($0,
RSTART, RLENGTH) "\r"; fflush()}'
Executing Test_environ()
Executing Test_external_env()
Executing Test_getenv()
Executing Test_mac_locale()
Executing Test_setenv()
Executing Test_special_env()


>From test_environ.vim:
Executed Test_environ()                            in   0.001717 seconds
Executed Test_external_env()                       in   0.092557 seconds
Executed Test_getenv()                             in   0.000727 seconds
Executed Test_mac_locale()                         in   0.135780 seconds
Executed Test_setenv()                             in   0.000656 seconds
Executed Test_special_env()                        in   0.000664 seconds
Executed 6 tests                         in   0.260058 seconds
1 FAILED:
Found errors in Test_mac_locale():
command line..script
/Users/dope/sb/vim/src/testdir/runtest.vim[459]..function
RunTheTest[44]..Test_mac_locale line 14: Default locale should have
UTF-8 encoding set, and LC_NUMERIC set to 'C': Pattern
'"\\([a-zA-Z_]\\+\\.UTF-8/\\)\\{3}C\\(/[a-zA-Z_]\\+\\.UTF-8\\)\\{2}"'
does not match 'Current language:
"en_US.UTF-8/UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8"\n'
make: *** [Makefile:66: test_environ] Error 1

The "locale" command outputs:

$ locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

Hmmm, I wonder why it does not use UTF-8 by
default!? Vim works fine with UTF-8 though at
first sight.

I tried this:
$ export LC_ALL=en_US.UTF-8

and it gives:
LANG=""
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

But the test still fails similarly.

I'm a macOS newbie, having only used macOS for
the last 2 days. So I'm still learning and might be missing
something obvious here. I've always used Linux before.

- OS: macOS Monterey 12.3.1.
- Vim: 8.2.4815 (latest from git)
- Terminal: iTerm2 3.4.15  (is there a better terminal
  for Vim on macOS by the way?)

:version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 24 2022 11:05:27)
macOS version - arm64
Included patches: 1-4815
Compiled by dope@MAC-F456C43F5F
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term -gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     -perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
-cscope            +localmap          -ruby              +wildignore
+cursorbind        -lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O
2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -g -O0 -fsanitize=address -
fno-omit-frame-pointer -DEXITFREE -DABORT_ON_INTERNAL_ERROR
Linking: gcc -o vim -lm -lncurses -liconv -framework AppKit -L/opt/homebrew/opt/
[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/config-3.9-dar
win -lpython3.9 -framework CoreFoundation -g -O0 -fsanitize=address -fno-omit-fr
ame-pointer

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAON-T_h3NMz0v_jKvr-9Vswe9ZfOEjX%2BCUJfWYGwtbJQA8pxEQ%40mail.gmail.com.

Raspunde prin e-mail lui