D20519: Fix double delete on broken files

Albert Astals Cid noreply at phabricator.kde.org
Sun Apr 14 17:14:24 BST 2019


aacid added a comment.


  In D20519#449595 <https://phabricator.kde.org/D20519#449595>, @dfaure wrote:
  
  > Good catch.
  >  I'd still prefer if such changes would come with a unittest, because it will be hard otherwise to immediately detect (while developing) that changes don't introduce any regressions.
  >  I managed to write a unittest for this one, please integrate it into your commit:
  >
  > http://www.davidfaure.fr/2019/ktar_unittest.diff
  
  
  
  
    QCOMPARE(listing[0], QString("mode=40777 path=dir type=dir"));
    QCOMPARE(listing[1], QString("mode=40777 path=dir type=dir"));
    QCOMPARE(listing.count(), 1);
  
  seems wrong, it should either be count = 2 or the second qcompare should go away, no?
  
  also, the listing variable it's empty when i run that test here.

REPOSITORY
  R243 KArchive

REVISION DETAIL
  https://phabricator.kde.org/D20519

To: aacid, dfaure
Cc: dfaure, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190414/b780e11e/attachment.html>


More information about the Kde-frameworks-devel mailing list