Patch 8.2.4082
Problem:    Check for autoload file name and prefix fails. (Christian J.
            Robinson)
Solution:   Only lower case the prefix on systems where the file name is not
            case sensitive.
Files:      src/scriptfile.c, src/testdir/test_vim9_import.vim


*** ../vim-8.2.4081/src/scriptfile.c    2022-01-12 15:15:22.871212756 +0000
--- src/scriptfile.c    2022-01-13 19:23:32.587972601 +0000
***************
*** 2156,2162 ****
--- 2156,2166 ----
  
      if (p == NULL)
        return NULL;
+ #ifdef CASE_INSENSITIVE_FILENAME
      prefix = strlow_save(p);
+ #else
+     prefix = vim_strsave(p);
+ #endif
      if (prefix == NULL)
        return NULL;
  
*** ../vim-8.2.4081/src/testdir/test_vim9_import.vim    2022-01-12 
19:47:00.343543324 +0000
--- src/testdir/test_vim9_import.vim    2022-01-13 19:22:48.656035068 +0000
***************
*** 1375,1380 ****
--- 1375,1405 ----
    &rtp = save_rtp
  enddef
  
+ " test using a autoloaded file that is case sensitive
+ def Test_vim9_autoload_case_sensitive()
+   var lines =<< trim END
+      vim9script autoload
+      export def CaseSensitive(): string
+        return 'done'
+      enddef
+   END
+ 
+   mkdir('Xdir/autoload', 'p')
+   writefile(lines, 'Xdir/autoload/CaseSensitive.vim')
+   var save_rtp = &rtp
+   exe 'set rtp^=' .. getcwd() .. '/Xdir'
+ 
+   lines =<< trim END
+       vim9script
+       import autoload 'CaseSensitive.vim'
+       assert_equal('done', CaseSensitive.CaseSensitive())
+   END
+   CheckScriptSuccess(lines)
+ 
+   delete('Xdir', 'rf')
+   &rtp = save_rtp
+ enddef
+ 
  " This was causing a crash because suppress_errthrow wasn't reset.
  def Test_vim9_autoload_error()
    var lines =<< trim END
*** ../vim-8.2.4081/src/version.c       2022-01-13 18:09:08.245764844 +0000
--- src/version.c       2022-01-13 19:15:24.188683837 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4082,
  /**/

-- 
You had connectors?  Eeee, when I were a lad we 'ad to carry the
bits between the computer and the terminal with a spoon...

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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/20220113192618.DF1B11C226D%40moolenaar.net.

Raspunde prin e-mail lui