From 353bb20ff7dd1540cc3ccda722b2ae3c0663202c Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 7 Aug 2014 16:45:13 -0300 Subject: build/test: setup functional tests using vroom --- test/legacy/test2-filename-recognition.vroom | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/legacy/test2-filename-recognition.vroom (limited to 'test') diff --git a/test/legacy/test2-filename-recognition.vroom b/test/legacy/test2-filename-recognition.vroom new file mode 100644 index 0000000000..b8169ec207 --- /dev/null +++ b/test/legacy/test2-filename-recognition.vroom @@ -0,0 +1,40 @@ +Test if URLs are recognized as filenames by commands such as "gf". Here +we'll use `expand("")` since "gf" would need to open the file. + +Insert some URLs: + + % 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 + +Go to the first URL: + + :/^first/tmp + +Append the url to the beginning of the buffer: + + :call append(0, expand("")) + +Repeat for the second URL, but navigate to the 'URL' word: + + :/^second/URL:call append(1, expand("")) + +Repeat for the other two, but first the 'isfname' option must be set to +allow '\' in filenames + + :set isf=@,48-57,/,.,-,_,+,,,$,:,~,\ + :/^third/name:call append(2, expand("")) + :/^fourth/URL:call append(3, expand("")) + +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 -- cgit