aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.ci/clang-asan.sh2
-rw-r--r--.ci/common.sh10
-rw-r--r--.ci/gcc-ia32.sh3
-rw-r--r--Makefile1
-rw-r--r--src/nvim/testdir/test2.in29
-rw-r--r--src/nvim/testdir/test2.ok4
-rw-r--r--test/legacy/test2-filename-recognition.vroom40
7 files changed, 56 insertions, 33 deletions
diff --git a/.ci/clang-asan.sh b/.ci/clang-asan.sh
index 2c67a3c1c6..cb6cfc8f41 100644
--- a/.ci/clang-asan.sh
+++ b/.ci/clang-asan.sh
@@ -1,5 +1,7 @@
. "$CI_SCRIPTS/common.sh"
+install_vroom
+
set_environment /opt/neovim-deps
sudo pip install cpp-coveralls
diff --git a/.ci/common.sh b/.ci/common.sh
index fdd448b4ce..a31b3063e9 100644
--- a/.ci/common.sh
+++ b/.ci/common.sh
@@ -65,6 +65,16 @@ install_prebuilt_deps() {
fi
}
+install_vroom() {
+ (
+ sudo pip install neovim
+ git clone git://github.com/google/vroom
+ cd vroom
+ python setup.py build
+ sudo python setup.py install
+ )
+}
+
tmpdir="$(pwd)/tmp"
rm -rf "$tmpdir"
mkdir -p "$tmpdir"
diff --git a/.ci/gcc-ia32.sh b/.ci/gcc-ia32.sh
index b4fc1745ed..05b539021e 100644
--- a/.ci/gcc-ia32.sh
+++ b/.ci/gcc-ia32.sh
@@ -1,4 +1,7 @@
. "$CI_SCRIPTS/common.sh"
+
+install_vroom
+
set_environment /opt/neovim-deps/32
# Need this to keep apt-get from removing gcc when installing libncurses
diff --git a/Makefile b/Makefile
index 9cf4a58894..54708c7c1a 100644
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,7 @@ endif
test: | nvim
+$(SINGLE_MAKE) -C src/nvim/testdir $(MAKEOVERRIDES)
+ PATH="$$(pwd)/build/bin:$$PATH" vroom --neovim --crawl test
unittest: | nvim
+$(BUILD_CMD) -C build unittest
diff --git a/src/nvim/testdir/test2.in b/src/nvim/testdir/test2.in
deleted file mode 100644
index b7b5a51066..0000000000
--- a/src/nvim/testdir/test2.in
+++ /dev/null
@@ -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
diff --git a/src/nvim/testdir/test2.ok b/src/nvim/testdir/test2.ok
deleted file mode 100644
index 32978825f8..0000000000
--- a/src/nvim/testdir/test2.ok
+++ /dev/null
@@ -1,4 +0,0 @@
-URL://machine.name/tmp/vimtest2a
-URL://machine.name/tmp/vimtest2b
-URL:\\machine.name\vimtest2c
-URL:\\machine.name\tmp\vimtest2d
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("<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