Commits

ZyX_I committed fbaab1b

tests: Added update subtest to drivers-bazaar test

Comments (0)

Files changed (3)

autoload/aurum/drivers/common/utils.vim

     endtry
 endif
 "▶1 utils.run :: cmd, hasnulls::0|1|2, path → [String] + shell
+" TODO Add utils.runtobuf for use in difftobuf functions
 function s:utils.run(cmd, hasnulls, cdpath)
     if a:hasnulls==2
         if has_key(s:F, 'readsystem')

test/drivers-bazaar.ok

Binary file modified.

test/drivers-bazaar.vim

 call Brepo.functions.label(Brepo, 'tag', 'rev-4',   0,   0, 0)
 call FormatRepository(Brepo)
 call FormatCS(Brepo, Brepo.functions.getcs(Brepo, '7'))
+let r+=[' >> Update']
+let fname=Brepo.path.'/lines.lst'
+let r+=['   readable: '.filereadable(fname)]
+call Brepo.functions.update(Brepo, '2', 0)
+let r+=['   readable: '.filereadable(fname)]
+let r+=['      fsize: '.getfsize(fname)]
+call writefile(['abc'], fname)
+let r+=['      fsize: '.getfsize(fname)]
+try
+    call Brepo.functions.update(Brepo, '3', 0)
+catch /^Frawor:[^:]*:updatef:/
+    let r+=[matchstr(v:exception, '\v^([^:]*\:){3}')]
+endtry
+let r+=['      fsize: '.getfsize(fname)]
+call Brepo.functions.update(Brepo, '3', 1)
+let r+=['      fsize: '.getfsize(fname)]
 
 call WriteFile(r)
 source addEmessages.vim