1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0357
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0357
Problem: Instructions for tests are outdated. (Jason Franklin)
Solution: Update the text.
Files: src/testdir/README.txt
*** ../vim-8.1.0356/src/testdir/README.txt 2018-02-20 15:36:03.000000000 +0100
--- src/testdir/README.txt 2018-09-01 14:24:39.775264173 +0200
***************
*** 15,37 ****
1) Create a test_<subject>.vim file.
2) Add test_<subject>.res to NEW_TESTS in Make_all.mak in alphabetical order.
! 3) Also add an entry in src/Makefile.
4) Use make test_<subject>.res to run a single test in src/testdir/.
Use make test_<subject> to run a single test in src/.
What you can use (see test_assert.vim for an example):
- Call assert_equal(), assert_true(), assert_false(), etc.
! - Use try/catch to check for exceptions.
! - Use alloc_fail() to have memory allocation fail. This makes it possible
! to check memory allocation failures are handled gracefully. You need to
! change the source code to add an ID to the allocation. Update LAST_ID_USED
! above alloc_id() to the highest ID used.
! - Use disable_char_avail_for_testing(1) if char_avail() must return FALSE for
! a while. E.g. to trigger the CursorMovedI autocommand event.
! See test_cursor_func.vim for an example
- If the bug that is being tested isn't fixed yet, you can throw an exception
! so that it's clear this still needs work. E.g.:
! throw "Skipped: Bug with <c-e> and popupmenu not fixed yet"
- See the start of runtest.vim for more help.
--- 15,54 ----
1) Create a test_<subject>.vim file.
2) Add test_<subject>.res to NEW_TESTS in Make_all.mak in alphabetical order.
! 3) Also add an entry "test_<subject>" in src/Make_all.mak.
4) Use make test_<subject>.res to run a single test in src/testdir/.
Use make test_<subject> to run a single test in src/.
+ At 2), instead of running the test separately, it can be included in
+ "test_alot". Do this for quick tests without side effects. The test runs a
+ bit faster, because Vim doesn't have to be started, one Vim instance runs many
+ tests.
+
+
What you can use (see test_assert.vim for an example):
+
- Call assert_equal(), assert_true(), assert_false(), etc.
!
! - Use assert_fails() to check for expected errors.
!
! - Use try/catch to avoid an exception aborts the test.
!
! - Use alloc_fail() to have memory allocation fail. This makes it possible to
! check memory allocation failures are handled gracefully. You need to change
!
! - the source code to add an ID to the allocation. Update LAST_ID_USED above
! alloc_id() to the highest ID used.
!
! - Use test_override() to make Vim behave differently, e.g. if char_avail()
! must return FALSE for a while. E.g. to trigger the CursorMovedI autocommand
! event.
!
! - See test_cursor_func.vim for an example.
!
- If the bug that is being tested isn't fixed yet, you can throw an exception
! with "Skipped" so that it's clear this still needs work. E.g.: throw
! "Skipped: Bug with <c-e> and popupmenu not fixed yet"
!
- See the start of runtest.vim for more help.
*** ../vim-8.1.0356/src/version.c 2018-09-09 15:54:11.232857907 +0200
--- src/version.c 2018-09-09 15:55:30.172188706 +0200
***************
*** 796,797 ****
--- 796,799 ----
{ /* Add new patch number below this line */
+ /**/
+ 357,
/**/
--
I am also told that there is a logical proof out there somewhere
that demonstrates that there is no task which duct tape cannot handle.
-- Paul Brannan
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|