summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-15 17:41:56 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-15 17:41:56 +0200
commit603d657219154ef074eeb70f6892b0b54e4fc19b (patch)
treeed28cd50fb467960d57343ca9ecc5e6a03ef7659 /src
parenta6aa78a3e3433db42b8ab644dab7cd327f6d9499 (diff)
downloadvim-git-7.4.2041.tar.gz
patch 7.4.2041v7.4.2041
Problem: Netbeans file authentication not tested. Solution: Add a test.
Diffstat (limited to 'src')
-rw-r--r--src/testdir/test_netbeans.vim25
-rw-r--r--src/version.c2
2 files changed, 27 insertions, 0 deletions
diff --git a/src/testdir/test_netbeans.vim b/src/testdir/test_netbeans.vim
index 055db2221..d47916838 100644
--- a/src/testdir/test_netbeans.vim
+++ b/src/testdir/test_netbeans.vim
@@ -49,3 +49,28 @@ func Test_nb_basic()
call ch_log('Test_nb_basic')
call s:run_server('Nb_basic')
endfunc
+
+func Nb_file_auth(port)
+ call assert_fails('nbstart =notexist', 'E660:')
+ call writefile(['host=localhost', 'port=' . a:port, 'auth=bunny'], 'Xnbauth')
+ call setfperm('Xnbauth', "rw-r--r--")
+ call assert_fails('nbstart =Xnbauth', 'E668:')
+ call setfperm('Xnbauth', "rw-------")
+ exe 'nbstart :localhost:' . a:port . ':bunny'
+ call assert_true(has("netbeans_enabled"))
+
+ call WaitFor('len(readfile("Xnetbeans")) > 2')
+ nbclose
+ let lines = readfile("Xnetbeans")
+ call assert_equal('AUTH bunny', lines[0])
+ call assert_equal('0:version=0 "2.5"', lines[1])
+ call assert_equal('0:startupDone=0', lines[2])
+
+ call delete("Xnbauth")
+ call delete("Xnetbeans")
+endfunc
+
+func Test_nb_file_auth()
+ call ch_log('Test_nb_file_auth')
+ call s:run_server('Nb_file_auth')
+endfunc
diff --git a/src/version.c b/src/version.c
index 9baf99e50..72b478932 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2041,
+/**/
2040,
/**/
2039,