]> granicus.if.org Git - vim/commitdiff
patch 9.0.1382: failing test for strptime() doesn't show returned value v9.0.1382
authorBram Moolenaar <Bram@vim.org>
Sun, 5 Mar 2023 19:27:49 +0000 (19:27 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 Mar 2023 19:27:49 +0000 (19:27 +0000)
Problem:    Failing test for strptime() doesn't show returned value.
Solution:   Use assert_equal() instead of assert_true().

src/testdir/test_vim9_builtin.vim
src/version.c

index 1e2b37857fcb65fe9ef73d86e0a8ef8ed1224ceb..b8500c5e61d09eed59715fde188425c1a234f6ee 100644 (file)
@@ -4286,8 +4286,8 @@ def Test_strptime()
   if exists_compiled('*strptime')
     v9.CheckDefAndScriptFailure(['strptime(10, "2021")'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1'])
     v9.CheckDefAndScriptFailure(['strptime("%Y", 2021)'], ['E1013: Argument 2: type mismatch, expected string but got number', 'E1174: String required for argument 2'])
-    assert_true(strptime('%Y', '2021') != 0)
-    assert_true(strptime('%Y', '') == 0)
+    assert_notequal(0, strptime('%Y', '2021'))
+    assert_equal(0, strptime('%Y', ''))
   endif
 enddef
 
index 19ea3e4a0267ba29e7ee14393ad6b773b78f62cf..8533a0815d3d9492a536b3179e8aa56708d5c28e 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1382,
 /**/
     1381,
 /**/