Commits

ZyX_I committed 8c55ca0

tests: Improved subversion tests

Comments (0)

Files changed (5)

autoload/aurum/drivers/subversion.vim

     let reverse=get(a:opts, 'reverse', 0)
     let kwargs={}
     let args=[]
-    for [k, v] in items(diffopts)
-        if v
-            let args+=['--extensions', '--'.k]
-        endif
+    for [k, v] in filter(items(diffopts), 'v:val[1]')
+        let args+=['--extensions', '--'.k]
     endfor
     "▶2 Get revision arguments
     if empty(a:rev2)

test/drivers-subversion-subdir.in

 :W{{{1 Commit
 :edit ./svntest-subdirrepo/newfile.vim
 iW In file newfile.vim:write
-:Run! AuCommit message Added\ newfile.vim type unknown ./svntest-subdirrepo/newfile.vim
+:AuCommit message Added\ newfile.vim type unknown ./svntest-subdirrepo/newfile.vim
 :WT
 :W{{{1 Commit 2
 oW File newfile.vim, second line:write
 Added second line to newfile.vim
 // It was not required really:write
 :WT
+:W{{{1 File
+:AuUpdate
+:let cs=aurum#changeset()
+:execute 'Run! AuFile '.(cs.rev-1)
+:bwipeout!
 :W{{{1 Update
 :AuUpdate 6 ./svntest-subdirrepo/
 :WTF
 :W{{{2 Status after junk
 :Run! AuStatus ./svntest-subdirrepo/
 :bwipeout!
+:source addEmessages.vim

test/drivers-subversion-subdir.ok

 {{{1 Status: between two revisions
 R file-2
 {{{1 Commit
-W In file newfile.vim
 o Changeset 10
 | @ Added newfile.vim
 {{{1 Commit 2
 o Changeset 11
 | @ Added second line to newfile.vim
 | @ // It was not required really
+{{{1 File
+W In file newfile.vim
 {{{1 Update
 Line 1
 First line

test/drivers-subversion.in

 :W{{{1 Commit
 :edit ./svntestrepo/newfile.vim
 iW In file newfile.vim:write
-:Run! AuCommit message Added\ newfile.vim type unknown ./svntestrepo/newfile.vim
+:AuCommit message Added\ newfile.vim type unknown ./svntestrepo/newfile.vim
 :WT
 :W{{{1 Commit 2
 oW File newfile.vim, second line:write
 Added second line to newfile.vim
 // It was not required really:write
 :WT
+:W{{{1 File
+:AuUpdate
+:let cs=aurum#changeset()
+:execute 'Run! AuFile '.(cs.rev-1)
+:bwipeout!
 :W{{{1 Update
 :AuUpdate 3 ./svntestrepo/
 :WTF
 :W{{{2 Status after junk
 :Run! AuStatus ./svntestrepo/
 :bwipeout!
+:source addEmessages.vim

test/drivers-subversion.ok

 R subdir2/stu
 R def
 {{{1 Commit
-W In file newfile.vim
 o Changeset 10
 | @ Added newfile.vim
 {{{1 Commit 2
 o Changeset 11
 | @ Added second line to newfile.vim
 | @ // It was not required really
+{{{1 File
+W In file newfile.vim
 {{{1 Update
 First line
 Second line