patch 9.1.1421: tests: need a test for the new-style tutor.tutor
Problem: tests: need a test for the new-style tutor.tutor, patch
9.1.1384 broke the expected positions for the signs
Solution: Update all number keys in tutor.tutor.json to match the
correct line numbers in tutor.tutor, replace tabs by spaces,
add a screen-dump test to verify it does not regress
(Pham Bình An)
closes: #17416
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b577ad50d0
commit
a541f1de2b
@ -1,35 +1,35 @@
|
|||||||
{
|
{
|
||||||
"expect": {
|
"expect": {
|
||||||
"63": "This is text with **important information**",
|
"56": "This is text with **important information**",
|
||||||
"64": "This is text with **important information**",
|
"57": "This is text with **important information**",
|
||||||
"71": "Document '&variable'",
|
"64": "Document '&variable'",
|
||||||
"72": "Document '&variable'",
|
"65": "Document '&variable'",
|
||||||
"78": "# This is a level 1 header",
|
"71": "# This is a level 1 header",
|
||||||
"79": "# This is a level 1 header",
|
"72": "# This is a level 1 header",
|
||||||
"80": "### This is a level 3 header",
|
"73": "### This is a level 3 header",
|
||||||
"81": "### This is a level 3 header",
|
"74": "### This is a level 3 header",
|
||||||
"82": "# This is a header with a label {*label*}",
|
"75": "# This is a header with a label {*label*}",
|
||||||
"83": "# This is a header with a label {*label*}",
|
"76": "# This is a header with a label {*label*}",
|
||||||
"108": "A link to help for the ['breakindent']('breakindent') option",
|
"101": "A link to help for the ['breakindent']('breakindent') option",
|
||||||
"109": "A link to help for the ['breakindent']('breakindent') option",
|
"102": "A link to help for the ['breakindent']('breakindent') option",
|
||||||
"123": "A link to the [Links](*links*) section",
|
"116": "A link to the [Links](*links*) section",
|
||||||
"124": "A link to the [Links](*links*) section",
|
"117": "A link to the [Links](*links*) section",
|
||||||
"139": "A link to [the vim-tutor-mode tutorial](@tutor:tutor)",
|
"132": "A link to [the vim-tutor-mode tutorial](@tutor:tutor)",
|
||||||
"140": "A link to [the vim-tutor-mode tutorial](@tutor:tutor)",
|
"133": "A link to [the vim-tutor-mode tutorial](@tutor:tutor)",
|
||||||
"157": "~~~ viml",
|
"150": "~~~ viml",
|
||||||
"158": "echom 'the value of &number is'.string(&number)",
|
"151": "echom 'the value of &number is'.string(&number)",
|
||||||
"159": "~~~",
|
"152": "~~~",
|
||||||
"161": "~~~ viml",
|
"154": "~~~ viml",
|
||||||
"162": "echom 'the value of &number is'.string(&number)",
|
"155": "echom 'the value of &number is'.string(&number)",
|
||||||
"163": "~~~",
|
"156": "~~~",
|
||||||
"188": "~~~ normal",
|
"181": "~~~ normal",
|
||||||
"189": "d2w",
|
"182": "d2w",
|
||||||
"190": "~~~",
|
"183": "~~~",
|
||||||
"192": "~~~ normal",
|
"185": "~~~ normal",
|
||||||
"193": "d2w",
|
"186": "d2w",
|
||||||
"194": "~~~",
|
"187": "~~~",
|
||||||
"206": "`d2w`{normal}",
|
"199": "`d2w`{normal}",
|
||||||
"207": "`d2w`{normal}",
|
"200": "`d2w`{normal}",
|
||||||
"244": -1
|
"237": -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
src/testdir/dumps/Test_plugin_tutor_mark_1.dump
Normal file
20
src/testdir/dumps/Test_plugin_tutor_mark_1.dump
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@7|"|2|"|:| |"|T|h|i|s| |i|s| |h|o|w| |t|h|i|s| |l|i|n|e| |s|h|o|u|l|d| |l|o@1|k|.|"|,| @25
|
||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@7|"|3|"|:| |-|1| @60
|
||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|}| @70
|
||||||
|
| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @74
|
||||||
|
| +0#0000e05#a8a8a8255@1|~+0#e000e06#ffffff0@2| +0#0000000&@72
|
||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@75
|
||||||
|
| +0#0000e05#a8a8a8255@1|T+0#0000000#ffffff0|h|e|s|e| |f|i|l|e|s| |c|o|n|t|a|i|n| |a|n| |"|e|x|p|e|c|t|"| |d|i|c|t|i|o|n|a|r|y|,| |f|o|r| |w|h|i|c|h| |t|h|e| |k|e|y|s| |a|r|e| |l|i|n|e| |n|u|m|b
|
||||||
|
| +0#0000e05#a8a8a8255@1|e+0#0000000#ffffff0|r|s| |a|n|d| @68
|
||||||
|
| +0#0000e05#a8a8a8255@1|t+0#0000000#ffffff0|h|e| |v|a|l|u|e|s| |a|r|e| |t|h|e| |e|x|p|e|c|t|e|d| |t|e|x|t|.| |A| |v|a|l|u|e| |o|f| |-|1| |m|e|a|n|s| |t|h|a|t| |t|h|e| |c|o|n|d|i|t|i|o|n| |f|o|r
|
||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|t|h|e| |l|i|n|e| @66
|
||||||
|
| +0#0000e05#a8a8a8255@1|w+0#0000000#ffffff0|i|l@1| |a|l|w|a|y|s| |b|e| |s|a|t|i|s|f|i|e|d|,| |n|o| |m|a|t@1|e|r| |w|h|a|t| |(|t|h|i|s| |i|s| |u|s|e|f|u|l| |f|o|r| |l|e|t@1|i|n|g| |t|h|e| |u|s|e
|
||||||
|
| +0#0000e05#a8a8a8255@1|r+0#0000000#ffffff0| |p|l|a|y| |a| |b|i|t|)|.| @61
|
||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@75
|
||||||
|
|✓+2#40ff4011&| |T+0#e000e06&|h|i|s| |i|s| |a|n| |"|e|x|p|e|c|t|"| |l|i|n|e| |t|h|a|t| |i|s| |a|l|w|a|y|s| |s|a|t|i|s|f|i|e|d|.| |T|r|y| |c|h|a|n|g|i|n|g| |i|t|.| +0#0000000&@8
|
||||||
|
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@75
|
||||||
|
| +0#0000e05#a8a8a8255@1|T+0#0000000#ffffff0|h|e|s|e| |f|i|l|e|s| |c|o|n|v|e|n|t|i|o|n|a|l@1|y| |h|a|v|e| |t|h|e| |s|a|m|e| |n|a|m|e| |a|s| |t|h|e| |t|u|t|o|r|i|a|l| |d|o|c|u|m|e|n|t| |w|i|t|h|
|
||||||
|
| +0#0000e05#a8a8a8255@1|t+0#0000000#ffffff0|h|e| |.|j|s|o|n| @66
|
||||||
|
| +0#0000e05#a8a8a8255@1>e+0#0000000#ffffff0|x|t|e|n|s|i|o|n| |a|p@1|e|n|d|e|d| |(|f|o|r| |a| |f|u|l@1| |e|x|a|m|p|l|e|,| |s|e@1| |t|h|e| |f|i|l|e| |t|h|a|t| |c|o|r@1|e|s|p|o|n|d|s| |t|o| |t|h|i
|
||||||
|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0| |t|u|t|o|r|i|a|l|)|.| @63
|
||||||
|
|:|2|4|0| @55|2|4|0|,|1| @8|B|o|t|
|
||||||
@ -1,5 +1,9 @@
|
|||||||
" Test for the new-tutor plugin
|
" Test for the new-tutor plugin
|
||||||
|
|
||||||
|
source screendump.vim
|
||||||
|
source check.vim
|
||||||
|
source script_util.vim
|
||||||
|
|
||||||
func SetUp()
|
func SetUp()
|
||||||
set nocompatible
|
set nocompatible
|
||||||
runtime plugin/tutor.vim
|
runtime plugin/tutor.vim
|
||||||
@ -32,3 +36,20 @@ func Test_tutor_link()
|
|||||||
endfor
|
endfor
|
||||||
endfor
|
endfor
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_mark()
|
||||||
|
CheckScreendump
|
||||||
|
call writefile([
|
||||||
|
\ 'set nocompatible',
|
||||||
|
\ 'runtime plugin/tutor.vim',
|
||||||
|
\ 'Tutor tutor',
|
||||||
|
\ 'set statusline=',
|
||||||
|
\ ], 'Xtest_plugin_tutor_mark', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S Xtest_plugin_tutor_mark', {'rows': 20, 'cols': 78})
|
||||||
|
call term_sendkeys(buf, ":240\<CR>")
|
||||||
|
call WaitForAssert({-> assert_match('Bot$', term_getline(buf, 20))})
|
||||||
|
call VerifyScreenDump(buf, 'Test_plugin_tutor_mark_1', {})
|
||||||
|
|
||||||
|
" clean up
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
endfunc
|
||||||
|
|||||||
@ -709,6 +709,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1421,
|
||||||
/**/
|
/**/
|
||||||
1420,
|
1420,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user