Commits

ZyX_I committed e8fb97b

tests: Added move, add, forget, remove, ignore and ignoreglob drivers-bazaar test subtests

Comments (0)

Files changed (2)

test/drivers-bazaar.ok

Binary file modified.

test/drivers-bazaar.vim

                     \string(a:repo.functions.getcsprop(a:repo, a:cs, p))]
     endfor
 endfunction
-function FormatStatus(status)
+function FormatStatus(status, ...)
     let g:r+=[' >> Status']
+    let expr='"     ".'
+    if a:0 && !empty(a:1)
+        let expr.='"xr"[filereadable(a:1."/".v:val)]." ".v:val'
+    else
+        let expr.='v:val'
+    endif
     for [key, files] in items(a:status)
-        let g:r+=['  - '.key]+map(copy(files), '"     ".v:val')
+        let g:r+=['  - '.key]+map(copy(files), expr)
     endfor
 endfunction
 let g:aurum_repocachetime=0
 let r+=['      fsize: '.getfsize(fname)]
 call Brepo.functions.update(Brepo, '3', 1)
 let r+=['      fsize: '.getfsize(fname)]
+call Brepo.functions.update(Brepo, '-1', 0)
+call writefile([], Brepo.path.'/completely-new', 'b')
+call writefile([], Brepo.path.'/I-', 'b')
+call writefile([], Brepo.path.'/Ign-', 'b')
+call writefile([], Brepo.path.'/Ign+', 'b')
+call Brepo.functions.move(Brepo, 0, 'added', '-added-moved')
+call Brepo.functions.add(Brepo, 'completely-new')
+call Brepo.functions.forget(Brepo, 'modified')
+call Brepo.functions.remove(Brepo, 'unknown')
+call Brepo.functions.ignore(Brepo, 'I-')
+call Brepo.functions.ignoreglob(Brepo, 'Ign*')
+call FormatStatus(Brepo.functions.status(Brepo, 0, 0, 0, 1, 1), Brepo.path)
 
 call WriteFile(r)
 source addEmessages.vim