mirror of
https://github.com/neovim/neovim.git
synced 2025-09-09 04:48:18 +00:00
build/test: setup functional tests using vroom
This commit is contained in:
1
Makefile
1
Makefile
@@ -76,6 +76,7 @@ endif
|
|||||||
|
|
||||||
test: | nvim
|
test: | nvim
|
||||||
+$(SINGLE_MAKE) -C src/nvim/testdir $(MAKEOVERRIDES)
|
+$(SINGLE_MAKE) -C src/nvim/testdir $(MAKEOVERRIDES)
|
||||||
|
PATH="$$(pwd)/build/bin:$$PATH" vroom --neovim --crawl test
|
||||||
|
|
||||||
unittest: | nvim
|
unittest: | nvim
|
||||||
+$(BUILD_CMD) -C build unittest
|
+$(BUILD_CMD) -C build unittest
|
||||||
|
@@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
This is a test if a URL is recognized by "gf", with the cursor before and
|
|
||||||
after the "://". Also test ":\\".
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
/^first
|
|
||||||
/tmp
|
|
||||||
:call append(0, expand("<cfile>"))
|
|
||||||
/^second
|
|
||||||
/URL
|
|
||||||
:call append(1, expand("<cfile>"))
|
|
||||||
:if has("ebcdic")
|
|
||||||
: set isf=@,240-249,/,.,-,_,+,,,$,:,~,\
|
|
||||||
:else
|
|
||||||
: set isf=@,48-57,/,.,-,_,+,,,$,:,~,\
|
|
||||||
:endif
|
|
||||||
/^third
|
|
||||||
/name
|
|
||||||
:call append(2, expand("<cfile>"))
|
|
||||||
/^fourth
|
|
||||||
/URL
|
|
||||||
:call append(3, expand("<cfile>"))
|
|
||||||
5GdG:wq! test.out
|
|
||||||
ENDTEST
|
|
||||||
first test for URL://machine.name/tmp/vimtest2a and other text
|
|
||||||
second test for URL://machine.name/tmp/vimtest2b. And other text
|
|
||||||
third test for URL:\\machine.name\vimtest2c and other text
|
|
||||||
fourth test for URL:\\machine.name\tmp\vimtest2d, and other text
|
|
@@ -1,4 +0,0 @@
|
|||||||
URL://machine.name/tmp/vimtest2a
|
|
||||||
URL://machine.name/tmp/vimtest2b
|
|
||||||
URL:\\machine.name\vimtest2c
|
|
||||||
URL:\\machine.name\tmp\vimtest2d
|
|
40
test/legacy/test2-filename-recognition.vroom
Normal file
40
test/legacy/test2-filename-recognition.vroom
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
Test if URLs are recognized as filenames by commands such as "gf". Here
|
||||||
|
we'll use `expand("<cfile>")` since "gf" would need to open the file.
|
||||||
|
|
||||||
|
Insert some URLs:
|
||||||
|
|
||||||
|
% first test for URL://machine.name/tmp/vimtest2a and other text<cr>
|
||||||
|
% second test for URL://machine.name/tmp/vimtest2b. And other text<cr>
|
||||||
|
% third test for URL:\\machine.name\vimtest2c and other text<cr>
|
||||||
|
% fourth test for URL:\\machine.name\tmp\vimtest2d, and other text
|
||||||
|
|
||||||
|
Go to the first URL:
|
||||||
|
|
||||||
|
:/^first<cr>/tmp
|
||||||
|
|
||||||
|
Append the url to the beginning of the buffer:
|
||||||
|
|
||||||
|
:call append(0, expand("<cfile>"))
|
||||||
|
|
||||||
|
Repeat for the second URL, but navigate to the 'URL' word:
|
||||||
|
|
||||||
|
:/^second<cr>/URL<cr>:call append(1, expand("<cfile>"))
|
||||||
|
|
||||||
|
Repeat for the other two, but first the 'isfname' option must be set to
|
||||||
|
allow '\' in filenames
|
||||||
|
|
||||||
|
:set isf=@,48-57,/,.,-,_,+,,,$,:,~,\
|
||||||
|
:/^third<cr>/name<cr>:call append(2, expand("<cfile>"))
|
||||||
|
:/^fourth<cr>/URL<cr>:call append(3, expand("<cfile>"))
|
||||||
|
|
||||||
|
Delete the initial text which starts at line 5:
|
||||||
|
|
||||||
|
> 5GdG
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
URL://machine.name/tmp/vimtest2a
|
||||||
|
URL://machine.name/tmp/vimtest2b
|
||||||
|
URL:\\machine.name\vimtest2c
|
||||||
|
URL:\\machine.name\tmp\vimtest2d
|
||||||
|
@end
|
Reference in New Issue
Block a user