Hi Bram and Kiichi!

2016-4-20(Wed) 23:21:26 UTC+9 Bram Moolenaar:
> Patch 7.4.1756
> Problem:    "dll" options are not expanded.
> Solution:   Expand environment variables. (Ozaki Kiichi)
> Files:      src/option.c, src/testdir/test_alot.vim,
>             src/testdir/test_expand_dllpath.vim
> 
> 
> *** ../vim-7.4.1755/src/option.c      2016-04-20 12:01:49.548584830 +0200
> --- src/option.c      2016-04-20 16:09:25.012992780 +0200
> ***************
> *** 1766,1772 ****
>                           (char_u *)&p_lpl, PV_NONE,
>                           {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_LUA)
> !     {"luadll",      NULL,   P_STRING|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_luadll, PV_NONE,
>                           {(char_u *)DYNAMIC_LUA_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> --- 1766,1772 ----
>                           (char_u *)&p_lpl, PV_NONE,
>                           {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_LUA)
> !     {"luadll",      NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_luadll, PV_NONE,
>                           {(char_u *)DYNAMIC_LUA_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> ***************
> *** 2012,2018 ****
>   #endif
>                               (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_PERL)
> !     {"perldll",     NULL,   P_STRING|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_perldll, PV_NONE,
>                           {(char_u *)DYNAMIC_PERL_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> --- 2012,2018 ----
>   #endif
>                               (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_PERL)
> !     {"perldll",     NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_perldll, PV_NONE,
>                           {(char_u *)DYNAMIC_PERL_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> ***************
> *** 2123,2135 ****
>   #endif
>                           {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_PYTHON3)
> !     {"pythonthreedll",  NULL,   P_STRING|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_py3dll, PV_NONE,
>                           {(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
>   #endif
>   #if defined(DYNAMIC_PYTHON)
> !     {"pythondll",   NULL,   P_STRING|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_pydll, PV_NONE,
>                           {(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> --- 2123,2135 ----
>   #endif
>                           {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_PYTHON3)
> !     {"pythonthreedll",  NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_py3dll, PV_NONE,
>                           {(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
>   #endif
>   #if defined(DYNAMIC_PYTHON)
> !     {"pythondll",   NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_pydll, PV_NONE,
>                           {(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> ***************
> *** 2208,2214 ****
>   #endif
>                           SCRIPTID_INIT},
>   #if defined(DYNAMIC_RUBY)
> !     {"rubydll",     NULL,   P_STRING|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_rubydll, PV_NONE,
>                           {(char_u *)DYNAMIC_RUBY_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> --- 2208,2214 ----
>   #endif
>                           SCRIPTID_INIT},
>   #if defined(DYNAMIC_RUBY)
> !     {"rubydll",     NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_rubydll, PV_NONE,
>                           {(char_u *)DYNAMIC_RUBY_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> ***************
> *** 2592,2598 ****
>                           (char_u *)&p_tgst, PV_NONE,
>                           {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_TCL)
> !     {"tcldll",      NULL,   P_STRING|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_tcldll, PV_NONE,
>                           {(char_u *)DYNAMIC_TCL_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> --- 2592,2598 ----
>                           (char_u *)&p_tgst, PV_NONE,
>                           {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
>   #if defined(DYNAMIC_TCL)
> !     {"tcldll",      NULL,   P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
>                           (char_u *)&p_tcldll, PV_NONE,
>                           {(char_u *)DYNAMIC_TCL_DLL, (char_u *)0L}
>                           SCRIPTID_INIT},
> *** ../vim-7.4.1755/src/testdir/test_alot.vim 2016-04-18 19:45:13.463066926 
> +0200
> --- src/testdir/test_alot.vim 2016-04-20 16:09:25.012992780 +0200
> ***************
> *** 8,13 ****
> --- 8,14 ----
>   source test_ex_undo.vim
>   source test_expr.vim
>   source test_expand.vim
> + source test_expand_dllpath.vim
>   source test_feedkeys.vim
>   source test_fnamemodify.vim
>   source test_file_perm.vim
> *** ../vim-7.4.1755/src/testdir/test_expand_dllpath.vim       2016-04-20 
> 16:17:54.139764115 +0200
> --- src/testdir/test_expand_dllpath.vim       2016-04-20 16:09:25.012992780 
> +0200
> ***************
> *** 0 ****
> --- 1,33 ----
> + scriptencoding utf-8
> + 
> + func s:test_expand_dllpath(optname)
> +   let $TEST_EXPAND_DLLPATH = '/dllpath/lib' . substitute(a:optname, 
> '\zedll$', '.', '')
> +   execute 'let dllpath_save = &' . a:optname
> +   try
> +     execute 'set ' . a:optname . '=$TEST_EXPAND_DLLPATH' 
> +     execute 'call assert_equal("' . $TEST_EXPAND_DLLPATH . '", &' . 
> a:optname . ')' 
> + 
> +     execute 'set ' . a:optname . '=~' . $TEST_EXPAND_DLLPATH
> +     execute 'call assert_equal("' . $HOME . $TEST_EXPAND_DLLPATH . '", &' . 
> a:optname . ')' 
> +   finally
> +     execute 'let &' . a:optname . ' = dllpath_save'
> +     let $TEST_EXPAND_DLLPATH = ''
> +   endtry
> + endfunc
> + 
> + func s:generate_test_if_exists(optname)
> +   if exists('&' . a:optname)
> +     execute join([
> +           \ 'func Test_expand_' . a:optname . '()',
> +           \ '  call s:test_expand_dllpath("' . a:optname . '")',
> +           \ 'endfunc'
> +           \ ], "\n")
> +   endif
> + endfunc
> + 
> + call s:generate_test_if_exists('luadll')
> + call s:generate_test_if_exists('perldll')
> + call s:generate_test_if_exists('pythondll')
> + call s:generate_test_if_exists('pythonthreedll')
> + call s:generate_test_if_exists('rubydll')
> + call s:generate_test_if_exists('tcldll')
> *** ../vim-7.4.1755/src/version.c     2016-04-20 14:59:19.047369459 +0200
> --- src/version.c     2016-04-20 16:11:28.171721425 +0200
> ***************
> *** 750,751 ****
> --- 750,753 ----
>   {   /* Add new patch number below this line */
> + /**/
> +     1756,
>   /**/

test_expand_dllpath.vim is not executed.
Because, there is no function that starts with `Test_`.
I fixed in the attaching patch.

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/Makefile b/src/Makefile
index 195cbd5..e880758 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2013,6 +2013,7 @@ test_arglist \
 	test_delete \
 	test_ex_undo \
 	test_expand \
+	test_expand_dllpath \
 	test_expr \
 	test_feedkeys \
 	test_file_perm \
diff --git a/src/testdir/test_expand_dllpath.vim b/src/testdir/test_expand_dllpath.vim
index e69e7e1..ea70bd0 100644
--- a/src/testdir/test_expand_dllpath.vim
+++ b/src/testdir/test_expand_dllpath.vim
@@ -25,9 +25,11 @@ func s:generate_test_if_exists(optname)
   endif
 endfunc
 
-call s:generate_test_if_exists('luadll')
-call s:generate_test_if_exists('perldll')
-call s:generate_test_if_exists('pythondll')
-call s:generate_test_if_exists('pythonthreedll')
-call s:generate_test_if_exists('rubydll')
-call s:generate_test_if_exists('tcldll')
+function Test_expand_dllpath()
+  call s:generate_test_if_exists('luadll')
+  call s:generate_test_if_exists('perldll')
+  call s:generate_test_if_exists('pythondll')
+  call s:generate_test_if_exists('pythonthreedll')
+  call s:generate_test_if_exists('rubydll')
+  call s:generate_test_if_exists('tcldll')
+endfunc

Raspunde prin e-mail lui