blob: 80c70435495844eb70c6dbb14be27550f0aaceee (
plain)
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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0456
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.0456
Problem: Running test hangs when the input file is being edited.
Solution: Use a SwapExists autocommand to ignore editing the test script.
Files: src/testdir/Makefile, src/testdir/runtest.vim
*** ../vim-8.1.0455/src/testdir/Makefile 2018-09-21 16:37:20.084248861 +0200
--- src/testdir/Makefile 2018-10-07 15:34:14.706152514 +0200
***************
*** 9,16 ****
SCRIPTSOURCE = ../../runtime
! # Change this to empty to see the verbose output of tests.
! REDIR_TEST_TO_NULL = > /dev/null
# Uncomment this line to use valgrind for memory leaks and extra warnings.
# The output goes into a file "valgrind.testN"
--- 9,18 ----
SCRIPTSOURCE = ../../runtime
! # Comment out this line to see the verbose output of tests.
! #
! # Catches SwapExists to avoid hanging at the ATTENTION prompt.
! REDIR_TEST_TO_NULL = --cmd 'au SwapExists * let v:swapchoice = "e"' > /dev/null
# Uncomment this line to use valgrind for memory leaks and extra warnings.
# The output goes into a file "valgrind.testN"
*** ../vim-8.1.0455/src/testdir/runtest.vim 2018-08-19 17:03:57.365405046 +0200
--- src/testdir/runtest.vim 2018-10-07 15:36:08.881535882 +0200
***************
*** 57,62 ****
--- 57,75 ----
set encoding=latin1
endif
+ " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for
+ " the test_name.vim file itself. Replace it here with a more restrictive one,
+ " so we still catch mistakes.
+ let s:test_script_fname = expand('%')
+ au! SwapExists * call HandleSwapExists()
+ func HandleSwapExists()
+ " Only ignore finding a swap file for the test script (the user might be
+ " editing it and do ":make test_name") and the output file.
+ if expand('<afile>') == 'messages' || expand('<afile>') =~ s:test_script_fname
+ let v:swapchoice = 'e'
+ endif
+ endfunc
+
" Avoid stopping at the "hit enter" prompt
set nomore
***************
*** 146,151 ****
--- 159,165 ----
" Clear any autocommands
au!
+ au SwapExists * call HandleSwapExists()
" Close any extra tab pages and windows and make the current one not modified.
while tabpagenr('$') > 1
*** ../vim-8.1.0455/src/version.c 2018-10-07 14:38:43.714247899 +0200
--- src/version.c 2018-10-07 15:32:36.262911893 +0200
***************
*** 794,795 ****
--- 794,797 ----
{ /* Add new patch number below this line */
+ /**/
+ 456,
/**/
--
hundred-and-one symptoms of being an internet addict:
166. You have been on your computer soo long that you didn't realize
you had grandchildren.
/// 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 ///
|