]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1318: tests: test_format fails v9.1.1318
authorzeertzjq <zeertzjq@outlook.com>
Fri, 18 Apr 2025 08:45:45 +0000 (10:45 +0200)
committerChristian Brabandt <cb@256bit.org>
Fri, 18 Apr 2025 08:47:58 +0000 (10:47 +0200)
Problem:  tests: test_format fails (after 9.1.1314).
Solution: Increase the string size.  Add missing test_format.res in
          NEW_TESTS_RES (zeertzjq).

closes: #17144

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt
src/testdir/Make_all.mak
src/testdir/test_format.vim
src/version.c

index 5a72e214f3c0137c243c94f98d45b9e891719419..4ad6b3d7d238edefb659b1cffd9cd7b28176f10f 100644 (file)
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2025 Mar 30
+*builtin.txt*  For Vim version 9.1.  Last change: 2025 Apr 18
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -8158,7 +8158,8 @@ printf({fmt}, {expr1} ...)                                *printf()*
 <                    1.41
 
                You will get an overflow error |E1510|, when the field-width
-               or precision will result in a string longer than 6400 chars.
+               or precision will result in a string longer than 1 MB
+               (1024*1024 = 1048576) chars.
 
                                                        *E1500*
                You cannot mix positional and non-positional arguments: >
index 55434b0dc868383cc30aa7e95d8e5bf9f7edcaa4..de4e30f754e42526f77130d6ff282c2f3a9a7d86 100644 (file)
@@ -434,6 +434,7 @@ NEW_TESTS_RES = \
        test_float_func.res \
        test_fnameescape.res \
        test_fold.res \
+       test_format.res \
        test_functions.res \
        test_function_lists.res \
        test_getcwd.res \
index 785348bee84d0760d80332b94e518e5cb63c7318..c2612889319807f54eac2c9fb66523716a4d62e3 100644 (file)
@@ -334,13 +334,13 @@ func Test_printf_pos_errors()
   call v9.CheckLegacyAndVim9Failure(["call printf('%1$*123456789$.*987654321$d', 5)"], "E1510:")
   call v9.CheckLegacyAndVim9Failure(["call printf('%123456789$*1$.*987654321$d', 5)"], "E1510:")
 
-  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$.*1$d', 5, 9999)"], "E1510:")
-  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*2$d', 5, 9999)"], "E1510:")
-  call v9.CheckLegacyAndVim9Failure(["call printf('%2$*3$.*1$d', 5, 9123, 9321)"], "E1510:")
-  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$.*3$d', 5, 9123, 9321)"], "E1510:")
-  call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$.*3$d', 5, 9123, 9312)"], "E1510:")
+  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$.*1$d', 5, 9999999)"], "E1510:")
+  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*2$d', 5, 9999999)"], "E1510:")
+  call v9.CheckLegacyAndVim9Failure(["call printf('%2$*3$.*1$d', 5, 9999123, 9999321)"], "E1510:")
+  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$.*3$d', 5, 9999123, 9999321)"], "E1510:")
+  call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$.*3$d', 5, 9999123, 9999312)"], "E1510:")
 
-  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$d', 5, 9999)"], "E1510:")
+  call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2$d', 5, 9999999)"], "E1510:")
 endfunc
 
 func Test_printf_pos_64bit()
index e6c8690d200c6cb0e43d0bcebc74d71776c5e0c4..a095b6782116b53cb1aab9bea08975c399fafce3 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1318,
 /**/
     1317,
 /**/